From a66a60fbad7eeb8ecdb09e0baf2becc2a95bd914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Tue, 17 Aug 2021 08:49:04 +0200 Subject: [PATCH] main: clear RUN LED before operation --- main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/main.c b/main.c index 3e770ce..820f518 100644 --- a/main.c +++ b/main.c @@ -222,6 +222,7 @@ void main(void) if (rw_button_pressed) { wait_10us(100); // wait 1 ms for the noise to be gone if (0 == (RW_BUTTON_PORT->IDR.reg & RW_BUTTON_PIN)) { // ensure the button is pressed (the pull-up is really weak) + run_led_off(); // clear RUN LED to see result at the end wait_10us(10000); // debounce for 100 ms uint8_t press_duration = 1; // start counting how long the button is pressed while (0 == (RW_BUTTON_PORT->IDR.reg & RW_BUTTON_PIN)) { // wait until button is depressed