uavcan: fix timer overrides (#24668)

The older defines without the L for the APB1 Low domain errored for some
of the timers, such as 6 and 7.

I checked and it turns out the defines with and without L are identical.
This commit is contained in:
Julian Oes
2025-04-05 09:42:17 +13:00
committed by GitHub
parent 45d7f707d7
commit ef932ae8a1
2 changed files with 3 additions and 3 deletions
@@ -19,7 +19,7 @@
#endif
/**
* Any General-Purpose timer (TIM2, TIM3, TIM4, TIM5)
* Any General-Purpose timer (TIM2, TIM3, TIM4, TIM5, TIM6, TIM7)
* e.g. -DUAVCAN_STM32H7_TIMER_NUMBER=2
*/
#ifndef UAVCAN_STM32H7_TIMER_NUMBER
@@ -25,8 +25,8 @@
# if UAVCAN_STM32H7_TIMER_NUMBER >= 2 && UAVCAN_STM32H7_TIMER_NUMBER <= 7
# define TIMX_RCC_ENR RCC->APB1ENR
# define TIMX_RCC_RSTR RCC->APB1RSTR
# define TIMX_RCC_ENR_MASK UAVCAN_STM32H7_GLUE3(RCC_APB1ENR_TIM, UAVCAN_STM32H7_TIMER_NUMBER, EN)
# define TIMX_RCC_RSTR_MASK UAVCAN_STM32H7_GLUE3(RCC_APB1RSTR_TIM, UAVCAN_STM32H7_TIMER_NUMBER, RST)
# define TIMX_RCC_ENR_MASK UAVCAN_STM32H7_GLUE3(RCC_APB1LENR_TIM, UAVCAN_STM32H7_TIMER_NUMBER, EN)
# define TIMX_RCC_RSTR_MASK UAVCAN_STM32H7_GLUE3(RCC_APB1LRSTR_TIM, UAVCAN_STM32H7_TIMER_NUMBER, RST)
# else
# error "This UAVCAN_STM32H7_TIMER_NUMBER is not supported yet"
# endif