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

Function releaseChannel

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

Release a channel and cleanup

Source from the content-addressed store, hash-verified

203
204// Release a channel and cleanup
205void releaseChannel(PwmPinState* ch) {
206 if (!ch || ch->pin < 0) return;
207
208 fl::digitalWrite(ch->pin, fl::PinValue::Low);
209
210 {
211 fl::isr::critical_section cs;
212 ch->pin = -1;
213 ch->backend = PwmBackend::None;
214 ch->frequency_hz = 0;
215 ch->duty_cycle = 0;
216 }
217
218 maybeShutdownIsr();
219}
220
221} // namespace pwm_state
222

Callers 10

setPwmFrequencyFunction · 0.85
pwmEndFunction · 0.85
pinModeFunction · 0.85
showMethod · 0.85
pollMethod · 0.85
pollChannelsMethod · 0.85
advancePipelineMethod · 0.85
pollMethod · 0.85

Calls 2

maybeShutdownIsrFunction · 0.85
digitalWriteFunction · 0.70

Tested by

no test coverage detected