Skip to content

Commit 9dba0b5

Browse files
authored
Update esp32-hal-uart.c
1 parent 0aae015 commit 9dba0b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cores/esp32/esp32-hal-uart.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ uart_t* uartBegin(uint8_t uart_nr, uint32_t baudrate, uint32_t config, int8_t rx
406406
}
407407
UART_MUTEX_UNLOCK();
408408
if (retCode) {
409-
// UART driver was already working, just return the uart_t structure, syaing that no new driver was installed
409+
// UART driver was already working, just return the uart_t structure, saying that no new driver was installed
410410
return uart;
411411
}
412412
// if we reach this point, it means that we need to restart the UART driver
@@ -716,6 +716,7 @@ void uartSetBaudRate(uart_t* uart, uint32_t baud_rate)
716716
#else
717717
uart_ll_set_baudrate(UART_LL_GET_HW(uart->num), baud_rate);
718718
#endif
719+
uart->_baudrate = baud_rate;
719720
UART_MUTEX_UNLOCK();
720721
}
721722

0 commit comments

Comments
 (0)