Skip to content
Prev Previous commit
Next Next commit
fix(example): uses volatile for ISR variables
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • Loading branch information
SuGlider and Copilot authored Jul 12, 2025
commit 51ff9fc6e20f5e160968f20e02313080b8a17cc3
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ volatile bool ledStateChanged = false; // Flag to indicate LED needs updating

// Variables to demonstrate lambda captures
volatile uint32_t totalInterrupts = 0;
unsigned long lastInterruptTime = 0;
volatile unsigned long lastInterruptTime = 0;

// Debouncing variables (volatile for ISR safety)
volatile unsigned long lastButton1InterruptTime = 0;
Expand Down
Loading