We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51ff9fc commit 71b8720Copy full SHA for 71b8720
libraries/ESP32/examples/GPIO/FunctionalInterruptLambda/FunctionalInterruptLambda.ino
@@ -184,8 +184,8 @@ void setup() {
184
Serial.println("Setting up Example 2: Lambda with pointer captures");
185
186
// Create pointers to avoid capturing static/global variables directly
187
- uint32_t* totalInterruptsPtr = &totalInterrupts;
188
- unsigned long* lastInterruptTimePtr = &lastInterruptTime;
+ volatile uint32_t* totalInterruptsPtr = &totalInterrupts;
+ volatile unsigned long* lastInterruptTimePtr = &lastInterruptTime;
189
volatile bool* ledStatePtr = &ledState;
190
volatile bool* ledStateChangedPtr = &ledStateChanged;
191
volatile unsigned long* lastButton2TimePtr = &lastButton2InterruptTime;
0 commit comments