clean shit

This commit is contained in:
2024-12-29 22:59:07 +08:00
parent 444804efe4
commit 0ebe9c5d16
15 changed files with 104 additions and 131 deletions

View File

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