[stm32][tim-config] fix F4 TIM6's IRQ source in STM32F412

This commit is contained in:
Meco Man 2024-03-07 19:53:39 -05:00 committed by Rbb666
parent 5f87e10032
commit 384a370c9a
1 changed files with 9 additions and 0 deletions

View File

@ -74,12 +74,21 @@ extern "C" {
#ifdef BSP_USING_TIM6
#ifndef TIM6_CONFIG
#if defined(STM32F412Cx) || defined(STM32F412Rx) || defined(STM32F412Vx) || defined(STM32F412Zx)
#define TIM6_CONFIG \
{ \
.tim_handle.Instance = TIM6, \
.tim_irqn = TIM6_IRQn, \
.name = "timer6", \
}
#else
#define TIM6_CONFIG \
{ \
.tim_handle.Instance = TIM6, \
.tim_irqn = TIM6_DAC_IRQn, \
.name = "timer6", \
}
#endif /* defined(STM32F412Cx) || defined(STM32F412Rx) || defined(STM32F412Vx) || defined(STM32F412Zx) */
#endif /* TIM6_CONFIG */
#endif /* BSP_USING_TIM6 */