From 29b0b63d1c7d90e9c2559d110993c825ec1f5fa4 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Mon, 26 May 2014 13:40:29 +0200 Subject: USB CDC available() method returns correct number of bytes in buffer. See #1953 --- cores/arduino/CDC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cores/arduino') diff --git a/cores/arduino/CDC.cpp b/cores/arduino/CDC.cpp index 3dbf15d..3cfd1b7 100644 --- a/cores/arduino/CDC.cpp +++ b/cores/arduino/CDC.cpp @@ -129,7 +129,7 @@ void Serial_::end(void) int Serial_::available(void) { if (peek_buffer >= 0) { - return 1; + return 1 + USB_Available(CDC_RX); } return USB_Available(CDC_RX); } -- cgit v1.2.3-18-g5258