mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
comments on Arduino flush() method (#8318)
This commit is contained in:
parent
93b7325cb8
commit
9d024d17fd
@ -183,7 +183,7 @@ public:
|
|||||||
{
|
{
|
||||||
return static_cast<int>(uart_tx_free(_uart));
|
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
|
size_t write(uint8_t c) override
|
||||||
{
|
{
|
||||||
return uart_write_char(_uart, c);
|
return uart_write_char(_uart, c);
|
||||||
|
@ -110,7 +110,10 @@ class Print {
|
|||||||
size_t println(const Printable&);
|
size_t println(const Printable&);
|
||||||
size_t println(void);
|
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..)
|
// by default write timeout is possible (outgoing data from network,serial..)
|
||||||
// (children can override to false (like String))
|
// (children can override to false (like String))
|
||||||
|
@ -72,7 +72,7 @@ public:
|
|||||||
size_t peekBytes(char *buffer, size_t length) {
|
size_t peekBytes(char *buffer, size_t length) {
|
||||||
return peekBytes((uint8_t *) buffer, 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); }
|
virtual void stop() override { (void)stop(0); }
|
||||||
bool flush(unsigned int maxWaitMs);
|
bool flush(unsigned int maxWaitMs);
|
||||||
bool stop(unsigned int maxWaitMs);
|
bool stop(unsigned int maxWaitMs);
|
||||||
|
@ -92,7 +92,7 @@ public:
|
|||||||
int read(char* buffer, size_t len) override { return read((unsigned char*)buffer, len); };
|
int read(char* buffer, size_t len) override { return read((unsigned char*)buffer, len); };
|
||||||
// Return the next byte from the current packet without moving on to the next byte
|
// Return the next byte from the current packet without moving on to the next byte
|
||||||
int peek() override;
|
int peek() override;
|
||||||
void flush() override; // Finish reading the current packet
|
void flush() 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
|
// Return the IP address of the host who sent the current incoming packet
|
||||||
IPAddress remoteIP() override;
|
IPAddress remoteIP() override;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user