1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-17 22:23:10 +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 d18dd0d7fd
commit 0687225031

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) {