From a0eade30776fc5144ce53f0f07373c8fd8fa3520 Mon Sep 17 00:00:00 2001 From: ethereal Date: Mon, 28 Nov 2016 17:05:57 -0800 Subject: [PATCH] Fix sending buffered data This fixes support for queuing data (and not sending it off directly) if e.g. the USB connection is disconnected and then reconnected. --- digistump-avr/libraries/DigisparkCDC/DigiCDC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/digistump-avr/libraries/DigisparkCDC/DigiCDC.cpp b/digistump-avr/libraries/DigisparkCDC/DigiCDC.cpp index 938283a..a2f2b74 100644 --- a/digistump-avr/libraries/DigisparkCDC/DigiCDC.cpp +++ b/digistump-avr/libraries/DigisparkCDC/DigiCDC.cpp @@ -151,7 +151,7 @@ void DigiCDCDevice::usbBegin() void DigiCDCDevice::usbPollWrapper() { usbPoll(); - while((!(RingBuffer_IsEmpty(&txBuf)))&&(index<9)) + while((!(RingBuffer_IsEmpty(&txBuf)))&&(index<8)) { tmp[index++] = RingBuffer_Remove(&txBuf); }