1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-30 19:52:13 +01:00

USB CDC available() method returns correct number of bytes in buffer.

See #1953
This commit is contained in:
Cristian Maglie 2014-05-26 13:40:29 +02:00
parent ddbb6b3914
commit 6914af0d63

View File

@ -129,7 +129,7 @@ void Serial_::end(void)
int Serial_::available(void) int Serial_::available(void)
{ {
if (peek_buffer >= 0) { if (peek_buffer >= 0) {
return 1; return 1 + USB_Available(CDC_RX);
} }
return USB_Available(CDC_RX); return USB_Available(CDC_RX);
} }