提交 5af139bb 编写于 作者: T Tomasz Ścisłowicz 提交者: Me No Dev

HardwareSerial - add changeBaudRate method (#2223)

* Add updateBaudRate to hardware serial

* remove flush

* Fix tab
上级 4f9a90fa
......@@ -73,6 +73,11 @@ void HardwareSerial::begin(unsigned long baud, uint32_t config, int8_t rxPin, in
}
}
void HardwareSerial::updateBaudRate(unsigned long baud)
{
uartSetBaudRate(_uart, baud);
}
void HardwareSerial::end()
{
if(uartGetDebug() == _uart_nr) {
......
......@@ -57,6 +57,7 @@ public:
void begin(unsigned long baud, uint32_t config=SERIAL_8N1, int8_t rxPin=-1, int8_t txPin=-1, bool invert=false, unsigned long timeout_ms = 20000UL);
void end();
void updateBaudRate(unsigned long baud);
int available(void);
int availableForWrite(void);
int peek(void);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册