We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 55e4695 commit 1af5c46Copy full SHA for 1af5c46
cores/arduino/HardwareSerial.h
@@ -146,7 +146,7 @@ class HardwareSerial : public Stream {
146
using Print::write; // pull in write(str) from Print
147
operator bool()
148
{
149
- return true;
+ return _ready;
150
}
151
152
void setRx(uint32_t _rx);
@@ -189,6 +189,7 @@ class HardwareSerial : public Stream {
189
#endif // HAL_UART_MODULE_ENABLED && !HAL_UART_MODULE_ONLY
190
191
private:
192
+ bool _ready;
193
bool _rx_enabled;
194
uint8_t _config;
195
unsigned long _baud;
0 commit comments