mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-07-30 18:42:55 +00:00
add volatile, as they are ISR-written outside the main loop
This commit is contained in:
@@ -210,8 +210,8 @@ class AnalogSensor {
|
||||
static void IRAM_ATTR freqIrq0();
|
||||
static void IRAM_ATTR freqIrq1();
|
||||
static void IRAM_ATTR freqIrq2();
|
||||
static unsigned long edge[3];
|
||||
static unsigned long edgecnt[3];
|
||||
static volatile unsigned long edge[3]; // written from freqIrqN() ISRs, read from the main measure() loop (partly outside the critical section)
|
||||
static volatile unsigned long edgecnt[3]; // written from freqIrqN() ISRs, read from the main measure() loop (partly outside the critical section)
|
||||
unsigned long lastedge[3] = {0, 0, 0};
|
||||
#endif
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user