FastLED 3.10.9
Loading...
Searching...
No Matches

◆ countIsrChannels()

u8 fl::pwm_state::countIsrChannels ( )

Definition at line 178 of file pin.cpp.hpp.

178 {
179 if (!g_state) return 0;
180 PwmStateData& st = *g_state;
181 u8 count = 0;
182 for (u8 i = 0; i < MAX_PWM_CHANNELS; i++) {
183 if (st.channels[i].pin >= 0 && st.channels[i].backend == PwmBackend::IsrSoftware) {
184 count++;
185 }
186 }
187 return count;
188}
constexpr u8 MAX_PWM_CHANNELS
Definition pin.cpp.hpp:78
PwmStateData * g_state
Definition pin.cpp.hpp:116
unsigned char u8
Definition stdint.h:131
PwmPinState channels[MAX_PWM_CHANNELS]
Definition pin.cpp.hpp:100

References fl::pwm_state::PwmPinState::backend, fl::pwm_state::PwmStateData::channels, fl::FL_NO_EXCEPT, g_state, IsrSoftware, MAX_PWM_CHANNELS, and fl::pwm_state::PwmPinState::pin.

Referenced by maybeShutdownIsr().

+ Here is the caller graph for this function: