Skip to content

Commit 1a305cd

Browse files
committed
Merge branch 'master' into ide-1.5.x
2 parents 65a4b40 + 11e02db commit 1a305cd

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

hardware/arduino/avr/cores/arduino/CDC.cpp

Lines changed: 2 additions & 0 deletions
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)

hardware/arduino/avr/cores/arduino/USBAPI.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ struct ring_buffer;
3636
class Serial_ : public Stream
3737
{
3838
private:
39-
int peek_buffer = -1;
39+
int peek_buffer;
4040
public:
41+
Serial_() { peek_buffer = -1; };
4142
void begin(unsigned long);
4243
void begin(unsigned long, uint8_t);
4344
void end(void);

0 commit comments

Comments
 (0)