generated from hulk/gd32e23x_template
recevice function
This commit is contained in:
@@ -99,26 +99,6 @@ void SysTick_Handler(void)
|
||||
{
|
||||
}
|
||||
|
||||
void TIMER13_IRQHandler(void)
|
||||
{
|
||||
if (timer_interrupt_flag_get(TIMER13, TIMER_INT_FLAG_UP) == SET)
|
||||
{
|
||||
timer_interrupt_flag_clear(TIMER13, TIMER_INT_FLAG_UP);
|
||||
static uint8_t led_status = 0;
|
||||
if (led_status)
|
||||
{
|
||||
//! turn on led & reconfig timer13 period to 19000(1900ms)
|
||||
gpio_bit_write(GPIOB, GPIO_PIN_1, RESET);
|
||||
timer_autoreload_value_config(TIMER13, 19200);
|
||||
} else {
|
||||
//! turn off led & reconfig timer13 period to 1000(100ms)
|
||||
gpio_bit_write(GPIOB, GPIO_PIN_1, SET);
|
||||
timer_autoreload_value_config(TIMER13, 800);
|
||||
}
|
||||
led_status = !led_status;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles TIMER5 interrupt request.
|
||||
* @param[in] none
|
||||
|
Reference in New Issue
Block a user