Skip to content

Commit

Permalink
Merge pull request #112 from WhereAreBugs/main
Browse files Browse the repository at this point in the history
add support of interrupt on gd32e23x
  • Loading branch information
maxgerhardt authored Oct 29, 2023
2 parents dfa7ccb + b382911 commit 445dec7
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions cores/arduino/gd32/gpio_interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,24 @@ extiConf_t gpio_exti_infor[EXTI_NUMS] = {
{EXTI4_15_IRQn, NULL},
{EXTI4_15_IRQn, NULL},
{EXTI4_15_IRQn, NULL}
#elif defined(GD32E23x)
{EXTI0_1_IRQn, NULL},
{EXTI0_1_IRQn, NULL},
{EXTI2_3_IRQn, NULL},
{EXTI2_3_IRQn, NULL},
{EXTI4_15_IRQn, NULL},
{EXTI4_15_IRQn, NULL},
{EXTI4_15_IRQn, NULL},
{EXTI4_15_IRQn, NULL},
{EXTI4_15_IRQn, NULL},
{EXTI4_15_IRQn, NULL},
{EXTI4_15_IRQn, NULL},
{EXTI4_15_IRQn, NULL},
{EXTI4_15_IRQn, NULL},
{EXTI4_15_IRQn, NULL},
{EXTI4_15_IRQn, NULL},
{EXTI4_15_IRQn, NULL}

#endif
};

Expand Down Expand Up @@ -174,4 +192,26 @@ void EXTI4_15_IRQHandler(void)
exti_callbackHandler(i);
}
}
#elif defined(GD32E23x)
void EXTI0_1_IRQHandler(void)
{
uint32_t i;
for ( i = 0; i < 2; i++) {
exti_callbackHandler(i);
}
}
void EXTI2_3_IRQHandler(void)
{
uint32_t i;
for (i = 2; i < 4; i++) {
exti_callbackHandler(i);
}
}
void EXTI4_15_IRQHandler(void)
{
uint32_t i;
for (i = 4; i < 16; i++) {
exti_callbackHandler(i);
}
}
#endif

0 comments on commit 445dec7

Please sign in to comment.