Sort and deduplicate trigger handlers

This commit is contained in:
Stefan Kerkmann 2021-03-20 22:04:34 +01:00
parent 352a6021f1
commit 7d90a998bf
1 changed files with 46 additions and 83 deletions

View File

@ -209,56 +209,17 @@
#define ECLIC_TRIGGER_DEFAULT ECLIC_POSTIVE_EDGE_TRIGGER
#define ECLIC_DMA_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_EXTI3_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_EXTI4_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_EXTI5_9_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_EXTI10_15_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_ST_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_ST_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_EXTI0_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_EXTI1_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_EXTI2_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_EXTI3_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_EXTI4_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_EXTI5_9_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_EXTI10_15_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_ST_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_ST_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_USB_OTG1_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_USB_OTG1_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_EXTI0_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_EXTI1_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_EXTI2_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_EXTI3_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_EXTI4_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_EXTI5_9_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_EXTI10_15_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_CAN_CAN1_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_CAN_CAN1_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_CAN_CAN1_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_CAN_CAN1_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_CAN_CAN1_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_CAN_CAN2_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_CAN_CAN2_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_CAN_CAN2_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_CAN_CAN2_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_CAN_CAN2_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_CAN_CAN3_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_CAN_CAN3_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_CAN_CAN3_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_CAN_CAN3_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_CAN_CAN3_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_I2C_I2C1_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_I2C_I2C1_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_I2C_I2C2_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_I2C_I2C2_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_I2C_I2C3_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_I2C_I2C3_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_USB_OTG1_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_USB_OTG2_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_RTC_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_SDC_SDIO_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_GPT_TIM10_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_GPT_TIM11_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_GPT_TIM12_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_GPT_TIM13_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_GPT_TIM14_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_GPT_TIM1_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_GPT_TIM21_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_GPT_TIM22_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_GPT_TIM2_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_GPT_TIM3_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_GPT_TIM4_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
@ -267,65 +228,67 @@
#define GD32_GPT_TIM7_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_GPT_TIM8_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_GPT_TIM9_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_GPT_TIM10_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_GPT_TIM11_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_GPT_TIM12_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_GPT_TIM13_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_GPT_TIM14_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_GPT_TIM21_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_GPT_TIM22_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_ICU_TIM1_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_I2C_I2C1_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_I2C_I2C2_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_I2C_I2C3_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_ICU_TIM1_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_ICU_TIM2_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_ICU_TIM3_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_ICU_TIM4_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_ICU_TIM5_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_ICU_TIM8_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_ICU_TIM8_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_PWM_TIM1_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_PWM_TIM1_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_PWM_TIM2_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_PWM_TIM3_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_PWM_TIM4_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_PWM_TIM5_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_PWM_TIM8_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_PWM_TIM8_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_ST_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_ST_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM1_UP_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_EXTI0_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_EXTI10_15_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_EXTI1_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_EXTI2_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_EXTI3_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_EXTI4_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_EXTI5_9_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM14_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM15_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM16_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM17_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM1_CC_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM1_UP_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM20_CC_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM20_UP_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM21_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM22_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM2_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM3_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM4_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM5_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM6_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM7_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM8_UP_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM8_CC_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM14_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM15_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM16_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM17_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM20_UP_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM20_CC_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM21_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM22_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_IRQ_TIM8_UP_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_PWM_TIM1_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_PWM_TIM2_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_PWM_TIM3_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_PWM_TIM4_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_PWM_TIM5_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_PWM_TIM8_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_RTC_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_SDC_SDIO_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_SERIAL_UART4_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_SERIAL_UART5_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_SERIAL_UART7_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_SERIAL_UART8_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_SERIAL_USART1_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_SERIAL_USART2_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_SERIAL_USART3_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_SERIAL_UART4_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_SERIAL_UART5_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_SERIAL_USART6_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_SERIAL_UART7_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_SERIAL_UART8_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_ST_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_UART_UART4_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_UART_UART5_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_UART_UART7_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_UART_UART8_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_UART_USART1_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_UART_USART2_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_UART_USART3_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_UART_UART4_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_UART_UART5_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_UART_USART6_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_UART_UART7_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_UART_UART8_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_USB_OTG1_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
#define GD32_USB_OTG2_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT
/*===========================================================================*/
/* Derived constants and error checks. */