Fix ringbuffer in serial connection between Mainboard and Touchscreen.
This commit is contained in:
@@ -66,7 +66,7 @@ ring_buffer tx_buffer_ajg = {{0}, 0, 0};
|
|||||||
|
|
||||||
inline void store_char(unsigned char c, ring_buffer *buffer)
|
inline void store_char(unsigned char c, ring_buffer *buffer)
|
||||||
{
|
{
|
||||||
int i = (unsigned int)(buffer->head + 1) % SERIAL_BUFFER_SIZE;
|
unsigned int i = ((unsigned int)(buffer->head + 1)) % SERIAL_BUFFER_SIZE;
|
||||||
|
|
||||||
// if we should be storing the received character into the location
|
// if we should be storing the received character into the location
|
||||||
// just before the tail (meaning that the head would advance to the
|
// just before the tail (meaning that the head would advance to the
|
||||||
|
Reference in New Issue
Block a user