Skip to content

Commit 72baf96

Browse files
committed
Rename CPU_FREQ macro to CLOCK_SPEED. Remove CPU_FREQ from system.h
1 parent af09857 commit 72baf96

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

test-app/app_stm32l0.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@
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

8888
static 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;

test-app/system.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
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 */

0 commit comments

Comments
 (0)