From: Nathael Pajani Date: Mon, 16 Sep 2024 18:01:50 +0000 (+0200) Subject: Make these vars volatile as they can be changed in interrupt context X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=981a47ce1bbb3ac5c3b2e5875938b97de6352a15;p=soft%2Flpc122x%2Fscialys Make these vars volatile as they can be changed in interrupt context --- diff --git a/v10/main.c b/v10/main.c index 72f2498..fb77a13 100644 --- a/v10/main.c +++ b/v10/main.c @@ -50,11 +50,11 @@ /* Flags and counters for forced modes */ -uint8_t forced_heater_mode = 0; /* Flag and force type (enum force_types) */ +volatile uint8_t forced_heater_mode = 0; /* Flag and force type (enum force_types) */ uint8_t manual_activation_request = 0; /* Flag */ uint16_t forced_target_temp = 0; -uint32_t forced_heater_delay = 0; /* Flag and counter */ -uint32_t forced_heater_duration = 0; /* Flag and counter */ +volatile uint32_t forced_heater_delay = 0; /* Flag and counter */ +volatile uint32_t forced_heater_duration = 0; /* Flag and counter */ uint8_t forced_cmd_val = 0; /* Error flags */