MCPcopy Create free account
hub / github.com/SmingHub/Sming / timerIsr

Method timerIsr

Sming/Libraries/Servo/Servo.cpp:18–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16}
17
18void Servo::timerIsr()
19{
20 auto& frame = frames[activeFrameIndex];
21 hardwareTimer.setInterval(frame.slots[activeSlot]);
22 if(activeSlot > 0) {
23 digitalWrite(frame.pins[activeSlot - 1], false);
24 }
25 ++activeSlot;
26 if(activeSlot < frame.slotCount) {
27 digitalWrite(frame.pins[activeSlot - 1], true);
28 } else {
29 activeFrameIndex = nextFrameIndex;
30 activeSlot = 0;
31 }
32}
33
34Servo::Servo()
35{

Callers 1

staticTimerIsrMethod · 0.45

Calls 2

digitalWriteFunction · 0.50
setIntervalMethod · 0.45

Tested by

no test coverage detected