diff options
author | Cristian Maglie <c.maglie@bug.st> | 2014-05-26 13:40:29 +0200 |
---|---|---|
committer | Cristian Maglie <c.maglie@bug.st> | 2014-05-30 10:46:46 +0200 |
commit | 29b0b63d1c7d90e9c2559d110993c825ec1f5fa4 (patch) | |
tree | b8b4dc6aeb7f821bbd9e02922c3342db490a03a4 /cores/arduino/CDC.cpp | |
parent | 5962f155f70a5c67d14280d1b178f5197fb00df4 (diff) |
USB CDC available() method returns correct number of bytes in buffer.
See #1953
Diffstat (limited to 'cores/arduino/CDC.cpp')
-rw-r--r-- | cores/arduino/CDC.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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); } |