application: minor, use proper wait

This commit is contained in:
King Kévin 2020-02-19 21:16:37 +01:00
parent 44c75a70a2
commit f1168608c7
1 changed files with 1 additions and 3 deletions

View File

@ -414,9 +414,7 @@ void main(void)
action = true; // action has been performed
puts("button pressed\n");
led_toggle(); // toggle LED
for (uint32_t i = 0; i < 1000000; i++) { // wait a bit to remove noise and double trigger
__asm__("nop");
}
sleep_ms(100); // wait a bit to remove noise and double trigger
button_flag = false; // reset flag
}
if (rtc_internal_tick_flag) { // the internal RTC ticked