MCPcopy Create free account
hub / github.com/arkhipenko/TaskScheduler / timerISR

Function timerISR

examples/Scheduler_example30_THREAD_SAFE/src/main.cpp:176–184  ·  view source on GitHub ↗

* Timer ISR - adjusts blink rate using thread-safe requestAction */

Source from the content-addressed store, hash-verified

174 * Timer ISR - adjusts blink rate using thread-safe requestAction
175 */
176void 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

Callers

nothing calls this directly

Calls 1

requestActionMethod · 0.80

Tested by

no test coverage detected