global: add tim irq defines

This commit is contained in:
King Kévin 2020-12-10 23:53:08 +01:00
parent 92c33da652
commit 9089a40e21
1 changed files with 12 additions and 0 deletions

View File

@ -390,8 +390,20 @@ int32_t adds32_safe(int32_t a, int32_t b);
#define RST_TIM(x) CAT2(RST_TIM,x)
/** get NVIC IRQ for timer base on TIM identifier */
#define NVIC_TIM_IRQ(x) CAT3(NVIC_TIM,x,_IRQ)
/** NVIC IRQ for timer 9 */
#define NVIC_TIM9_IRQ NVIC_TIM1_BRK_TIM9_IRQ
/** NVIC IRQ for timer 10 */
#define NVIC_TIM10_IRQ NVIC_TIM1_UP_TIM10_IRQ
/** NVIC IRQ for timer 11 */
#define NVIC_TIM11_IRQ NVIC_TIM1_TRG_COM_TIM11_IRQ
/** get interrupt service routine for timer base on TIM identifier */
#define TIM_ISR(x) CAT3(tim,x,_isr)
/** interrupt service routine for timer 9 */
#define tim9_isr tim1_brk_tim9_isr
/** interrupt service routine for timer 10 */
#define tim10_isr tim1_up_tim10_isr
/** interrupt service routine for timer 11 */
#define tim11_isr tim1_trg_com_tim11_isr
/** get TIM_IC based on CHx identifier */
#define TIM_IC(x) CAT2(TIM_IC,x)
/** get TIM_IC_IN_TI based on CHx identifier */