Skip to content

Commit 6038075

Browse files
committed
USB CDC available() method returns correct number of bytes in buffer.
See #1953
1 parent a7ac8f6 commit 6038075

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arduino/cores/arduino/CDC.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ void Serial_::end(void)
129129
int Serial_::available(void)
130130
{
131131
if (peek_buffer >= 0) {
132-
return 1;
132+
return 1 + USB_Available(CDC_RX);
133133
}
134134
return USB_Available(CDC_RX);
135135
}

0 commit comments

Comments
 (0)