Hi All.
I’m attempting to call the version of addLeds defined by the 3rd template in this group from FastLED.h:
#ifdef SPI_DATA
template static CLEDController &addLeds(struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset = 0) {
return addLeds<CHIPSET, SPI_DATA, SPI_CLOCK, RGB>(data, nLedsOrOffset, nLedsIfOffset);
}
template<ESPIChipsets CHIPSET, EOrder RGB_ORDER> static CLEDController &addLeds(struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset = 0) {
return addLeds<CHIPSET, SPI_DATA, SPI_CLOCK, RGB_ORDER>(data, nLedsOrOffset, nLedsIfOffset);
}
template<ESPIChipsets CHIPSET, EOrder RGB_ORDER, uint8_t SPI_DATA_RATE> static CLEDController &addLeds(struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset = 0) {
return addLeds<CHIPSET, SPI_DATA, SPI_CLOCK, RGB_ORDER, SPI_DATA_RATE>(data, nLedsOrOffset, nLedsIfOffset);
}
#endif
The line in my code is:
LEDS.addLeds<APA102, RGB, 10>(leds, NUM_LEDS);
Since template’s SPI_DATA_RATE is declared a uint8_t, I’m guessing that the frequency is in MHz.
However, compiler is complaining with:
“call of overloaded ‘addLeds(CRGB [120], int, int)’ is ambiguous”
The Board is a Teensy 3.2 with the APA102 LEDs connected to its default SPI clock and data pins.
Appreciate any help on getting this to work.
Thanks in advance.
PS: an invocation of the first template above does work:
LEDS.addLeds(leds, NUM_LEDS);