mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-28 05:30:34 +08:00
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:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user