MCPcopy Create free account
hub / github.com/FastLED/FastLED / setPinState

Function setPinState

src/platforms/stub/stub_gpio.cpp.hpp:68–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66// ============================================================================
67
68void setPinState(int pin, bool high) FL_NOEXCEPT {
69 pinStateMap()[pin] = high ? 1 : 0;
70 // Fire callback for this pin with duration=0 (state changes via direct GPIO toggling carry no timing info)
71 auto& callbacks = pinCallbackMap();
72 auto it = callbacks.find(pin);
73 if (it != callbacks.end() && it->second) {
74 it->second(high, 0u);
75 }
76}
77
78bool getPinState(int pin) FL_NOEXCEPT {
79 auto& state = pinStateMap();

Callers 1

digitalWriteFunction · 0.85

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected