Skip to content

Commit 00b8833

Browse files
committed
Fixed regression in USBAPI and CDC (xaljox)
See: arduino/Arduino@9ac7e30#commitcomment-6718676
1 parent e97ef2d commit 00b8833

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

arduino/cores/arduino/CDC.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,12 @@ bool WEAK CDC_Setup(Setup& setup)
116116

117117
void Serial_::begin(unsigned long baud_count)
118118
{
119+
peek_buffer = -1;
119120
}
120121

121122
void Serial_::begin(unsigned long baud_count, byte config)
122123
{
124+
peek_buffer = -1;
123125
}
124126

125127
void Serial_::end(void)

arduino/cores/arduino/USBAPI.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ extern USBDevice_ USBDevice;
2828
class Serial_ : public Stream
2929
{
3030
private:
31-
int peek_buffer = -1;
31+
int peek_buffer;
3232
public:
33+
Serial_() { peek_buffer = -1; };
3334
void begin(unsigned long);
3435
void begin(unsigned long, uint8_t);
3536
void end(void);

0 commit comments

Comments
 (0)