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

Function allocate

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

Allocate a free channel

Source from the content-addressed store, hash-verified

150
151// Allocate a free channel
152PwmPinState* allocate() {
153 PwmStateData& st = state();
154 for (u8 i = 0; i < MAX_PWM_CHANNELS; i++) {
155 if (st.channels[i].pin < 0) {
156 return &st.channels[i];
157 }
158 }
159 return nullptr;
160}
161
162// Count active ISR-backend channels
163u8 countIsrChannels() {

Callers 1

setPwmFrequencyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected