Skip to content

Commit 1af5c46

Browse files
authored
Update HardwareSerial.h
Signed-off-by: patricklaf <[email protected]>
1 parent 55e4695 commit 1af5c46

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cores/arduino/HardwareSerial.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class HardwareSerial : public Stream {
146146
using Print::write; // pull in write(str) from Print
147147
operator bool()
148148
{
149-
return true;
149+
return _ready;
150150
}
151151

152152
void setRx(uint32_t _rx);
@@ -189,6 +189,7 @@ class HardwareSerial : public Stream {
189189
#endif // HAL_UART_MODULE_ENABLED && !HAL_UART_MODULE_ONLY
190190

191191
private:
192+
bool _ready;
192193
bool _rx_enabled;
193194
uint8_t _config;
194195
unsigned long _baud;

0 commit comments

Comments
 (0)