mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-20 04:53:28 +02:00
Make UART flush function consistent (#748)
See also https://github.com/esphome/esphome/commit/78be9d29376d5fdcff81874540c540eb80a338f6
This commit is contained in:
@@ -316,7 +316,9 @@ uint8_t ESP8266SoftwareSerial::peek_byte() {
|
||||
return 0;
|
||||
return this->rx_buffer_[this->rx_out_pos_];
|
||||
}
|
||||
void ESP8266SoftwareSerial::flush() { this->rx_in_pos_ = this->rx_out_pos_ = 0; }
|
||||
void ESP8266SoftwareSerial::flush() {
|
||||
// Flush is a NO-OP with software serial, all bytes are written immediately.
|
||||
}
|
||||
int ESP8266SoftwareSerial::available() {
|
||||
int avail = int(this->rx_in_pos_) - int(this->rx_out_pos_);
|
||||
if (avail < 0)
|
||||
|
||||
Reference in New Issue
Block a user