Skip to content
Snippets Groups Projects
Commit 7521c1dc authored by cnlohr's avatar cnlohr
Browse files

Merge branch 'master' of https://github.com/cnlohr/ch32v003fun

parents 8b18ce51 28aac823
No related branches found
No related tags found
No related merge requests found
......@@ -5121,10 +5121,10 @@ void SystemInit(void);
#else
#define UART_BAUD_RATE 115200
#endif
#define OVER8DIV 4
#define INTEGER_DIVIDER (((25 * (FUNCONF_SYSTEM_CORE_CLOCK)) / ((OVER8DIV) * (UART_BAUD_RATE))))
#define OVER4DIV 4
#define INTEGER_DIVIDER (((25 * (FUNCONF_SYSTEM_CORE_CLOCK)) / ((OVER4DIV) * (UART_BAUD_RATE))))
#define FRACTIONAL_DIVIDER ((INTEGER_DIVIDER)%100)
#define UART_BRR ((((INTEGER_DIVIDER) / 100) << 4) | (((((FRACTIONAL_DIVIDER) * ((OVER8DIV)*2)) + 50)/100)&7))
#define UART_BRR ((((INTEGER_DIVIDER) / 100) << 4) | (((((FRACTIONAL_DIVIDER) * ((OVER4DIV)*4)) + 50)/100)&15))
// Put an output debug UART on Pin D5.
// You can write to this with printf(...) or puts(...)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment