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

comments on Arduino flush() method#8318

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
d-a-v merged 2 commits intoesp8266:masterfromd-a-v:flushcomment
Sep 29, 2021
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletioncores/esp8266/HardwareSerial.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -183,7 +183,7 @@ class HardwareSerial: public Stream
{
return static_cast<int>(uart_tx_free(_uart));
}
void flush(void) override;
void flush(void) override; // wait for all outgoing characters to be sent, output buffer is empty after this call
size_t write(uint8_t c) override
{
return uart_write_char(_uart, c);
Expand Down
5 changes: 4 additions & 1 deletioncores/esp8266/Print.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -110,7 +110,10 @@ class Print {
size_t println(const Printable&);
size_t println(void);

virtual void flush() { /* Empty implementation for backward compatibility */ }
// flush():
// Empty implementation by default in Print::
// should wait for all outgoing characters to be sent, output buffer is empty after this call
virtual void flush() { }

// by default write timeout is possible (outgoing data from network,serial..)
// (children can override to false (like String))
Expand Down
2 changes: 1 addition & 1 deletionlibraries/ESP8266WiFi/src/WiFiClient.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -72,7 +72,7 @@ class WiFiClient : public Client, public SList<WiFiClient> {
size_t peekBytes(char *buffer, size_t length) {
return peekBytes((uint8_t *) buffer, length);
}
virtual void flush() override { (void)flush(0); }
virtual void flush() override { (void)flush(0); } // wait for all outgoing characters to be sent, output buffer should be empty after this call
virtual void stop() override { (void)stop(0); }
bool flush(unsigned int maxWaitMs);
bool stop(unsigned int maxWaitMs);
Expand Down
2 changes: 1 addition & 1 deletionlibraries/ESP8266WiFi/src/WiFiUdp.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -92,7 +92,7 @@ class WiFiUDP : public UDP, public SList<WiFiUDP> {
intread(char* buffer,size_t len)override {returnread((unsignedchar*)buffer, len); };
// Return the next byte from the current packet without moving on to the next byte
intpeek()override;
voidflush()override;//Finish reading the current packet
voidflush()override;//wait for all outgoing characters to be sent, output buffer is empty after this call

// Return the IP address of the host who sent the current incoming packet
IPAddressremoteIP()override;
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp