diff --git a/main.c b/main.c index cfcd1a7..83a6c93 100644 --- a/main.c +++ b/main.c @@ -228,6 +228,9 @@ void main(void) wait_10us(10000); // wait for 100 ms press_duration++; IWDG_KR = IWDG_KR_KEY_REFRESH; // reset watchdog + if (press_duration >= 30) { // 3 seconds already passed + break; // stop waiting for button to be released + } } led_error = false; // reset error state if (press_duration < 30) { // less than 3 sec