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

Function findByPin

src/fl/system/pin.cpp.hpp:141–149  ·  view source on GitHub ↗

Find channel by pin number

Source from the content-addressed store, hash-verified

139
140// Find channel by pin number
141PwmPinState* findByPin(int pin) {
142 PwmStateData& st = state();
143 for (u8 i = 0; i < MAX_PWM_CHANNELS; i++) {
144 if (st.channels[i].pin == pin) {
145 return &st.channels[i];
146 }
147 }
148 return nullptr;
149}
150
151// Allocate a free channel
152PwmPinState* allocate() {

Callers 6

analogWriteFunction · 0.85
setPwm16Function · 0.85
setPwmFrequencyFunction · 0.85
getPwmFrequencyFunction · 0.85
pwmEndFunction · 0.85
pinModeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected