recevice function

This commit is contained in:
2024-12-11 15:42:11 +08:00
parent c90ecf05f9
commit 44cf0426e5
5 changed files with 51 additions and 65 deletions

View File

@@ -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