diff --git a/application.c b/application.c index 69b36f5..d99d274 100644 --- a/application.c +++ b/application.c @@ -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