into exti IRQ OK
This commit is contained in:
@@ -115,4 +115,30 @@ void TIMER13_IRQHandler(void) {
|
||||
}
|
||||
led_status = !led_status;
|
||||
}
|
||||
}
|
||||
|
||||
void TIMER15_IRQHandler(void) {
|
||||
if (timer_interrupt_flag_get(TIMER15, TIMER_INT_FLAG_UP) == SET)
|
||||
{
|
||||
timer_interrupt_flag_clear(TIMER15, TIMER_INT_FLAG_UP);
|
||||
|
||||
exti_interrupt_enable(EXTI_0);
|
||||
// timer_enable(TIMER14);
|
||||
|
||||
gpio_bit_toggle(GPIOA, GPIO_PIN_7);
|
||||
|
||||
timer_disable(TIMER15);
|
||||
}
|
||||
}
|
||||
|
||||
void EXTI0_1_IRQHandler(void) {
|
||||
if (exti_interrupt_flag_get(EXTI_0) == SET) {
|
||||
exti_interrupt_flag_clear(EXTI_0);
|
||||
|
||||
gpio_bit_toggle(GPIOA, GPIO_PIN_5);
|
||||
|
||||
timer_event_software_generate(TIMER14, TIMER_EVENT_SRC_CH0G);
|
||||
|
||||
exti_interrupt_disable(EXTI_0);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user