Fix ringbuffer in serial connection between Mainboard and Touchscreen.

This commit is contained in:
Knutwurst
2020-06-02 19:18:23 +02:00
parent 3591d3f7fa
commit 612108066d

View File

@@ -66,7 +66,7 @@ ring_buffer tx_buffer_ajg = {{0}, 0, 0};
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
// just before the tail (meaning that the head would advance to the