generated from hulk/gd32e23x_template
clean shit
This commit is contained in:
@@ -103,15 +103,15 @@ void SysTick_Handler(void) {
|
||||
* @retval None
|
||||
*/
|
||||
void TIMER16_IRQHandler(void) {
|
||||
if (timer_interrupt_flag_get(LED_TIMER, TIMER_INT_FLAG_UP) == SET) {
|
||||
timer_interrupt_flag_clear(LED_TIMER, TIMER_INT_FLAG_UP);
|
||||
if (timer_interrupt_flag_get(LED_BLINK_TIMER, TIMER_INT_FLAG_UP) == SET) {
|
||||
timer_interrupt_flag_clear(LED_BLINK_TIMER, TIMER_INT_FLAG_UP);
|
||||
static uint8_t led_status = 0;
|
||||
if (led_status) {
|
||||
gpio_bit_write(LED_PORT, LED_PIN, RESET);
|
||||
timer_autoreload_value_config(LED_TIMER, 19200);
|
||||
timer_autoreload_value_config(LED_BLINK_TIMER, 19200);
|
||||
} else {
|
||||
gpio_bit_write(LED_PORT, LED_PIN, SET);
|
||||
timer_autoreload_value_config(LED_TIMER, 800);
|
||||
timer_autoreload_value_config(LED_BLINK_TIMER, 800);
|
||||
}
|
||||
led_status = !led_status;
|
||||
}
|
||||
|
Reference in New Issue
Block a user