From 70520af03b4773c2bf2850b0e3f56b32ad71c409 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 14 Dec 2023 23:38:04 +0100 Subject: [PATCH] style --- armsrc/util.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/armsrc/util.c b/armsrc/util.c index 9f42c0b08..0834e619d 100644 --- a/armsrc/util.c +++ b/armsrc/util.c @@ -268,8 +268,9 @@ int BUTTON_HELD(int ms) { int ticks = (48000 * (ms ? ms : 1000)) >> 10; // If we're not even pressed, forget about it! - if (BUTTON_PRESS() == false) + if (BUTTON_PRESS() == false) { return BUTTON_NO_CLICK; + } // Borrow a PWM unit for my real-time clock AT91C_BASE_PWMC->PWMC_ENA = PWM_CHANNEL(0); @@ -284,12 +285,14 @@ int BUTTON_HELD(int ms) { uint16_t now = AT91C_BASE_PWMC_CH0->PWMC_CCNTR; // As soon as our button let go, we didn't hold long enough - if (BUTTON_PRESS() == false) + if (BUTTON_PRESS() == false) { return BUTTON_SINGLE_CLICK; + } // Have we waited the full second? - else if (now == (uint16_t)(start + ticks)) + else if (now == (uint16_t)(start + ticks)) { return BUTTON_HOLD; + } WDT_HIT(); }