* Timer ISR - adjusts blink rate using thread-safe requestAction */
| 174 | * Timer ISR - adjusts blink rate using thread-safe requestAction |
| 175 | */ |
| 176 | void IRAM_ATTR timerISR() { |
| 177 | // Change the blink interval from ISR (thread-safe) |
| 178 | static uint32_t nextInterval = 1000; |
| 179 | |
| 180 | ts.requestAction(&tBlink, TASK_REQUEST_SETINTERVAL, nextInterval, 0, 0, 0, 0); |
| 181 | |
| 182 | // Alternate between fast and slow |
| 183 | nextInterval = (nextInterval == 1000) ? 200 : 1000; |
| 184 | } |
| 185 | |
| 186 | // ============================================ |
| 187 | // Worker Thread |
nothing calls this directly
no test coverage detected