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

◆ getDataPin()

int fl::ChannelConfig::getDataPin ( ) const

Get data pin (works for both clockless and SPI)

Examples
/home/runner/work/FastLED/FastLED/src/fl/channels/config.h.

Definition at line 64 of file config.cpp.hpp.

64 {
65 if (const ClocklessChipset* clockless = chipset.ptr<ClocklessChipset>()) {
66 return clockless->pin;
67 } else if (const SpiChipsetConfig* spi = chipset.ptr<SpiChipsetConfig>()) {
68 return spi->dataPin;
69 }
70 return -1; // Invalid/empty variant
71}
ChipsetVariant chipset
Chipset configuration (clockless or SPI)
Definition config.h:264

References chipset.