mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-27 21:16:50 +03:00
Fix Serial.write(0) overloading (#5878)
Add missing "using Print::write" to the HWSerial class to get the proper overrides to make Serial.write(0) and Serial1.write(0) work as expected.
This commit is contained in:
parent
e46ccae9d5
commit
9365f6d116
@ -156,10 +156,7 @@ public:
|
||||
{
|
||||
return uart_write(_uart, (const char*)buffer, size);
|
||||
}
|
||||
size_t write(const char *buffer)
|
||||
{
|
||||
return buffer? uart_write(_uart, buffer, strlen(buffer)): 0;
|
||||
}
|
||||
using Print::write; // Import other write() methods to support things like write(0) properly
|
||||
operator bool() const
|
||||
{
|
||||
return _uart != 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user