mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-11 15:22:13 +03:00
Added Serial.baudRate() to get current baud rate (#2079)
* Changed WifInfo settings and WeMos board name * Added board name to have in sketch and MDNS/OTA * board naming convention https://github.com/esp8266/Arduino/pull/2054 * Added Serial.baudRate() to get current baud rate * Added more description - Added note about Software Serial Implementation - Indicate this will works on ESP8266 boards only
This commit is contained in:
@ -180,6 +180,13 @@ size_t HardwareSerial::write(uint8_t c)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int HardwareSerial::baudRate(void)
|
||||
{
|
||||
// Null pointer on _uart is checked by SDK
|
||||
return uart_get_baudrate(_uart);
|
||||
}
|
||||
|
||||
|
||||
HardwareSerial::operator bool() const
|
||||
{
|
||||
return _uart != 0;
|
||||
|
Reference in New Issue
Block a user