From 6d2a01d574147df5b7858bce3b7484789ab3c7ac Mon Sep 17 00:00:00 2001 From: Alexander Heldt Date: Mon, 30 Dec 2024 11:44:18 +0100 Subject: [PATCH] Generalise naming of `TIMx_ENABLE` --- src/timer.c | 2 +- src/timer.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/timer.c b/src/timer.c index cb794d3..0bec1bd 100644 --- a/src/timer.c +++ b/src/timer.c @@ -18,5 +18,5 @@ void tim4_init(void) { } void tim4_start(void) { - TIM4->CR1 |= TIM4_ENABLE; + TIM4->CR1 |= TIM_ENABLE; } diff --git a/src/timer.h b/src/timer.h index 18eebc4..3b386de 100644 --- a/src/timer.h +++ b/src/timer.h @@ -29,8 +29,8 @@ struct timer { #define TIM4_BASE_ADDR (0x40000800U) #define TIM4 ((struct timer *) TIM4_BASE_ADDR) -#define TIM4_CR_CEN_BIT 0 -#define TIM4_ENABLE (1 << TIM4_CR_CEN_BIT) +#define TIM_CR1_CEN_BIT 0 +#define TIM_ENABLE (1 << TIM_CR1_CEN_BIT) void tim4_init(void); void tim4_start(void);