void s88_check(void)
{
+ /* Check remaining read count before ringbuffer fill. If it is zero, no
+ more bytes are arriving in the buffer and the contents can be sent out. */
+ uint8_t rc = s88_read_count;
uint8_t count = ringbuffer_fill(s88_buffer);
- if(count>=4 || (count>0 && !s88_read_count))
+ if(count>=4 || (count>0 && !rc))
{
uint8_t reply[10];