FastLED 3.9.15
Loading...
Searching...
No Matches

◆ findByPin()

PwmPinState * fl::pwm_state::findByPin ( int pin)

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

141 {
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}
constexpr u8 MAX_PWM_CHANNELS
Definition pin.cpp.hpp:79
PwmStateData & state()
Definition pin.cpp.hpp:109
unsigned char u8
Definition stdint.h:131
PwmPinState channels[MAX_PWM_CHANNELS]
Definition pin.cpp.hpp:101

References fl::pwm_state::PwmStateData::channels, MAX_PWM_CHANNELS, fl::pwm_state::PwmPinState::pin, and state().

Referenced by fl::analogWrite(), fl::getPwmFrequency(), fl::pinMode(), fl::pwmEnd(), fl::setPwm16(), and fl::setPwmFrequency().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: