File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change 8181#define UART2_RX_PIN 2
8282#define UART2_TX_PIN 3
8383
84- #ifndef CPU_FREQ
85- #define CPU_FREQ (24000000)
84+ #ifndef CLOCK_SPEED
85+ #define CLOCK_SPEED (24000000)
8686#endif
8787
8888static void uart2_pins_setup (void )
@@ -117,7 +117,7 @@ int uart_setup(uint32_t bitrate)
117117 UART2_CR1 &= (~UART_CR1_OVER8 );
118118
119119 /* Configure clock */
120- UART2_BRR |= (uint16_t )(CPU_FREQ / bitrate );
120+ UART2_BRR |= (uint16_t )(CLOCK_SPEED / bitrate );
121121
122122 /* Configure data bits to 8 */
123123 UART2_CR1 &= ~UART_CR1_SYMBOL_LEN ;
Original file line number Diff line number Diff line change 2323#ifndef SYSTEM_H_INCLUDED
2424#define SYSTEM_H_INCLUDED
2525
26- /* System specific: PLL with 8 MHz external oscillator, CPU at 168MHz */
27- #define CPU_FREQ (168000000)
2826#define PLL_FULL_MASK (0x7F037FFF)
2927
3028/* Assembly helpers */
You can’t perform that action at this time.
0 commit comments