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

Function blink1CB

examples/Scheduler_example27_PlatformIO/src/main.cpp:88–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86// === 1 =======================================
87bool LED_state = false;
88void blink1CB() {
89 if ( tBlink1.isFirstIteration() ) {
90 _PP(millis());
91 _PL(": Blink1 - simple flag driven");
92 LED_state = false;
93 }
94
95 if ( LED_state ) {
96 LEDOff();
97 LED_state = false;
98 }
99 else {
100 LEDOn();
101 LED_state = true;
102 }
103
104 if ( tBlink1.isLastIteration() ) {
105 tBlink2.restartDelayed( 2 * TASK_SECOND );
106 LEDOff();
107 }
108}
109
110
111// === 2 ======================================

Callers

nothing calls this directly

Calls 6

millisFunction · 0.85
isFirstIterationMethod · 0.80
isLastIterationMethod · 0.80
restartDelayedMethod · 0.80
LEDOffFunction · 0.70
LEDOnFunction · 0.70

Tested by

no test coverage detected