pref: 删除多余注释
This commit is contained in:
12
app/isr.c
12
app/isr.c
@@ -218,26 +218,24 @@ void EXTI15_10_IRQHandler(void)
|
||||
EXTI_ClearITPendingBit(EXTI_Line10);
|
||||
}
|
||||
if (SET == EXTI_GetITStatus(EXTI_Line11)) {
|
||||
static uint64_t time_fly = 0;
|
||||
static uint64_t time_via = 0;
|
||||
|
||||
if (RESET == gpio_get_level(E11)) {
|
||||
system_delay_us(200);
|
||||
if (RESET == gpio_get_level(E11)) {
|
||||
time_fly = system_get_tick();
|
||||
// rotate_button = rotate_button_press_short;
|
||||
time_via = system_get_tick();
|
||||
}
|
||||
EXTI_ClearITPendingBit(EXTI_Line11);
|
||||
} else {
|
||||
system_delay_us(200);
|
||||
if (SET == gpio_get_level(E11)) {
|
||||
// rotate_button = rotate_button_press_short;
|
||||
time_fly = system_get_tick() - time_fly;
|
||||
if (time_fly > LONG_PRESS_THRESHOLD_TICK) {
|
||||
time_via = system_get_tick() - time_via;
|
||||
if (time_via > LONG_PRESS_THRESHOLD_TICK) {
|
||||
rotate_button = rotate_button_press_long;
|
||||
} else {
|
||||
rotate_button = rotate_button_press_short;
|
||||
}
|
||||
time_fly = 0;
|
||||
time_via = 0;
|
||||
}
|
||||
EXTI_ClearITPendingBit(EXTI_Line11);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user