FastLED 3.10.6
Loading...
Searching...
No Matches

◆ addLedsSpiChannel() [3/4]

template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN, fl::Bus B = fl::Bus::AUTO, fl::u8 B_WHICH = 0>
::CLEDController & CFastLED::addLedsSpiChannel ( CRGB * data,
int nLedsOrOffset,
int nLedsIfOffset = 0 )
inlinestatic

Add an SPI based CLEDController via Channel API (default RGB order and speed).

Definition at line 1224 of file FastLED.h.

1224 {
1225 fl::SpiEncoder encoder = fl::SpiEncoder::spiEncoderForChipset(
1226 static_cast<fl::SpiChipset>(CHIPSET));
1227 fl::SpiChipsetConfig spiCfg(DATA_PIN, CLOCK_PIN, encoder);
1228 // HD108 defaults to GRB; all other SPI chipsets default to RGB.
1229 constexpr fl::EOrder order =
1231 ? GRB : RGB;
1233 return addLedsSpiDispatch<CHIPSET, DATA_PIN, CLOCK_PIN, 0, 2, order, B, B_WHICH>(data, nLedsOrOffset, nLedsIfOffset, spiCfg, UseSlim());
1234 }
#define DATA_PIN
Definition ClientReal.h:82
#define CHIPSET
LPD8806Controller WS2803Controller MY9221Controller APA102Controller APA102ControllerHD APA102Controller HD108Controller SK9822ControllerHD ::CLEDController & addLedsSpiDispatch(CRGB *data, int nLedsOrOffset, int nLedsIfOffset, const fl::SpiChipsetConfig &spiCfg, fl::true_type)
Definition FastLED.h:1180
constexpr EOrder GRB
Definition eorder.h:19
constexpr EOrder RGB
Definition eorder.h:17
EOrder
RGB color channel orderings, used when instantiating controllers to determine what order the controll...
Definition eorder.h:13
SpiChipset
LED chipsets with SPI interface (clocked protocols) Modern type-safe enum class - prefer this for new...
@ HD108
16-bit variant of HD107, always gamma corrected. No SD (standard definition) option available - all H...
static SpiEncoder spiEncoderForChipset(SpiChipset chipset, u32 speed_hz_override=0) FL_NO_EXCEPT
Look up the default SpiEncoder for a given chipset.
Definition spi.h:161

References addLedsSpiDispatch(), CHIPSET, CLOCK_PIN, DATA_PIN, GRB, fl::HD108, RGB, and fl::SpiEncoder::spiEncoderForChipset().

+ Here is the call graph for this function: