Skip to content

Commit 29b0b63

Browse files
committedMay 30, 2014
USB CDC available() method returns correct number of bytes in buffer.
See #1953
1 parent 5962f15 commit 29b0b63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎cores/arduino/CDC.cpp

Lines changed: 1 addition & 1 deletion
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)
Please sign in to comment.