mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-23 19:21:59 +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;
|
||||
|
@ -133,6 +133,7 @@ public:
|
||||
void setDebugOutput(bool);
|
||||
bool isTxEnabled(void);
|
||||
bool isRxEnabled(void);
|
||||
int baudRate(void);
|
||||
|
||||
protected:
|
||||
int _uart_nr;
|
||||
|
Reference in New Issue
Block a user