mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-13 17:00:19 +00:00
Improve ESP flasher baud rate setting
Use old baud rate and autodetected divider to calculate new divider. This works better with higher baud rates and drifting clocks. CL: mos: Improve ESP flasher baud rate setting PUBLISHED_FROM=7761e756c3ae7cc76e3b9a4fe3e40d06a779b2e8
This commit is contained in:
1 parent
95a36b1759
commit
0b2e474d52
8 files changed
+43
-23
No files matched your search
@@ -20,9 +20,11 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
void set_baud_rate(uint32_t uart_no, uint32_t baud_rate);
|
||||
#include "uart_register.h"
|
||||
|
||||
uint32_t set_baud_rate(uint32_t uart_no, uint32_t old_baud_rate,
|
||||
uint32_t new_baud_rate);
|
||||
|
||||
#define REG_UART_BASE(i) (0x60000000 + (i) *0xf00)
|
||||
#define UART_FIFO_REG(i) (REG_UART_BASE(i) + 0x0)
|
||||
#define UART_CONF1_REG(i) (REG_UART_BASE(i) + 0x24)
|
||||
#define UART_RX_TOUT_EN (BIT(31))
|
||||
|
||||
Reference in new issue
Block a user