Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit49b8eef

Browse files
authored
HardwareSerial's flush() method to override the method of the base class Print (#2254)
* add flush() method to HardwareSerial* remove default argument
1 parent1863c25 commit49b8eef

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

‎cores/arduino/HardwareSerial.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,11 @@ int HardwareSerial::availableForWrite(void)
487487
return tail - head -1;
488488
}
489489

490+
voidHardwareSerial::flush()
491+
{
492+
flush(0);
493+
}
494+
490495
voidHardwareSerial::flush(uint32_t timeout)
491496
{
492497
// If we have never written a byte, no need to flush. This special

‎cores/arduino/HardwareSerial.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ class HardwareSerial : public Stream {
125125
virtualintpeek(void);
126126
virtualintread(void);
127127
intavailableForWrite(void);
128-
virtualvoidflush(uint32_t timeout =0);
128+
virtualvoidflush();
129+
voidflush(uint32_t timeout);
129130
virtualsize_twrite(uint8_t);
130131
inlinesize_twrite(unsignedlong n)
131132
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp