application: minor, use proper wait
This commit is contained in:
parent
44c75a70a2
commit
f1168608c7
|
@ -414,9 +414,7 @@ void main(void)
|
||||||
action = true; // action has been performed
|
action = true; // action has been performed
|
||||||
puts("button pressed\n");
|
puts("button pressed\n");
|
||||||
led_toggle(); // toggle LED
|
led_toggle(); // toggle LED
|
||||||
for (uint32_t i = 0; i < 1000000; i++) { // wait a bit to remove noise and double trigger
|
sleep_ms(100); // wait a bit to remove noise and double trigger
|
||||||
__asm__("nop");
|
|
||||||
}
|
|
||||||
button_flag = false; // reset flag
|
button_flag = false; // reset flag
|
||||||
}
|
}
|
||||||
if (rtc_internal_tick_flag) { // the internal RTC ticked
|
if (rtc_internal_tick_flag) { // the internal RTC ticked
|
||||||
|
|
Loading…
Reference in New Issue