1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-21 10:26:06 +03:00

fix UART clock divider

UART clock is constant
This commit is contained in:
ficeto 2015-05-03 20:56:58 +03:00
parent 735277fff9
commit b752822aef

View File

@ -269,7 +269,7 @@ void ICACHE_FLASH_ATTR uart_set_baudrate(uart_t* uart, int baud_rate) {
if(uart == 0) if(uart == 0)
return; return;
uart->baud_rate = baud_rate; uart->baud_rate = baud_rate;
USD(uart->uart_nr) = (F_CPU / uart->baud_rate); USD(uart->uart_nr) = (80000000UL / uart->baud_rate);
} }
int ICACHE_FLASH_ATTR uart_get_baudrate(uart_t* uart) { int ICACHE_FLASH_ATTR uart_get_baudrate(uart_t* uart) {