FastLED 3.10.8
Loading...
Searching...
No Matches

◆ countIsrChannels()

u8 fl::pwm_state::countIsrChannels ( )

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

177 {
178 if (!g_state) return 0;
179 PwmStateData& st = *g_state;
180 u8 count = 0;
181 for (u8 i = 0; i < MAX_PWM_CHANNELS; i++) {
182 if (st.channels[i].pin >= 0 && st.channels[i].backend == PwmBackend::IsrSoftware) {
183 count++;
184 }
185 }
186 return count;
187}
constexpr u8 MAX_PWM_CHANNELS
Definition pin.cpp.hpp:78
PwmStateData * g_state
Definition pin.cpp.hpp:115
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: