Rename CPU_FREQ macro to CLOCK_SPEED. Remove CPU_FREQ from system.h

pull/572/head
Alex Lanzano 2025-05-10 18:00:13 -04:00
parent af09857f70
commit 72baf96440
2 changed files with 3 additions and 5 deletions

View File

@ -81,8 +81,8 @@
#define UART2_RX_PIN 2
#define UART2_TX_PIN 3
#ifndef CPU_FREQ
#define CPU_FREQ (24000000)
#ifndef CLOCK_SPEED
#define CLOCK_SPEED (24000000)
#endif
static void uart2_pins_setup(void)
@ -117,7 +117,7 @@ int uart_setup(uint32_t bitrate)
UART2_CR1 &= (~UART_CR1_OVER8);
/* Configure clock */
UART2_BRR |= (uint16_t)(CPU_FREQ / bitrate);
UART2_BRR |= (uint16_t)(CLOCK_SPEED / bitrate);
/* Configure data bits to 8 */
UART2_CR1 &= ~UART_CR1_SYMBOL_LEN;

View File

@ -23,8 +23,6 @@
#ifndef SYSTEM_H_INCLUDED
#define SYSTEM_H_INCLUDED
/* System specific: PLL with 8 MHz external oscillator, CPU at 168MHz */
#define CPU_FREQ (168000000)
#define PLL_FULL_MASK (0x7F037FFF)
/* Assembly helpers */