HardwareSerial - add changeBaudRate method (#2223)
* Add updateBaudRate to hardware serial * remove flush * Fix tab
This commit is contained in:
parent
4f9a90fa0e
commit
5af139bb74
@ -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()
|
void HardwareSerial::end()
|
||||||
{
|
{
|
||||||
if(uartGetDebug() == _uart_nr) {
|
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 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 end();
|
||||||
|
void updateBaudRate(unsigned long baud);
|
||||||
int available(void);
|
int available(void);
|
||||||
int availableForWrite(void);
|
int availableForWrite(void);
|
||||||
int peek(void);
|
int peek(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user