Skip to content

Commit 794669f

Browse files
marcusbirkinfacchinm
authored andcommitted
UART: Allow baud rate changes
1 parent b97a5db commit 794669f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cores/arduino/Serial.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ void UART::begin(unsigned long baudrate, uint16_t config) {
7575
void UART::begin(unsigned long baudrate) {
7676
if (_serial == NULL) {
7777
_serial = new mbed::UnbufferedSerial(tx, rx, baudrate);
78+
} else {
79+
_serial->baud(baudrate);
7880
}
7981
if (rts != NC) {
8082
_serial->set_flow_control(mbed::SerialBase::Flow::RTSCTS, rts, cts);

0 commit comments

Comments
 (0)