1
0
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:
Charles
2016-06-15 12:35:33 +02:00
committed by Ivan Grokhotkov
parent cbe8f7cb2d
commit 44d27228c5
3 changed files with 23 additions and 0 deletions

View File

@ -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;