From dc86d26a11ffe3e1ac9add8fb2d397fbee20984b Mon Sep 17 00:00:00 2001 From: Peter Van Hoyweghen Date: Mon, 30 Jul 2012 21:54:19 +0200 Subject: Avoid serial buffer overrun on leonardo --- cores/arduino/USBCore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cores/arduino/USBCore.cpp') diff --git a/cores/arduino/USBCore.cpp b/cores/arduino/USBCore.cpp index 6766be6..8bcf66c 100644 --- a/cores/arduino/USBCore.cpp +++ b/cores/arduino/USBCore.cpp @@ -603,7 +603,7 @@ ISR(USB_GEN_vect) { #ifdef CDC_ENABLED USB_Flush(CDC_TX); // Send a tx frame if found - while (USB_Available(CDC_RX)) // Handle received bytes (if any) + if (USB_Available(CDC_RX)) // Handle received bytes (if any) Serial.accept(); #endif -- cgit v1.2.3-18-g5258