FastLED 3.10.10
Loading...
Searching...
No Matches

◆ canHandle()

bool fl::SpiChannelEngineAdapter::canHandle ( const ChannelDataPtr & data) const
overridevirtual

Check if adapter can handle channel data.

Parameters
dataChannel data to check
Returns
true if data is true SPI chipset (APA102, SK9822, HD108)
Note
Rejects clockless chipsets (WS2812, SK6812, etc.)

Implements fl::IChannelDriver.

Definition at line 204 of file spi_channel_adapter.cpp.hpp.

204 {
205 if (!data) {
206 return false;
207 }
208
209 // ⚠️ CRITICAL: Accept ONLY true SPI chipsets (APA102, SK9822, HD108)
210 // Reject clockless chipsets (WS2812, SK6812) - those use ChannelEngineSpi or RMT
211 //
212 // This is the opposite of ChannelEngineSpi::canHandle(), which should be:
213 // return !data->isSpi(); // Accept clockless, reject true SPI
214 //
215 // Correct routing:
216 // APA102 → SpiChannelEngineAdapter (this adapter)
217 // WS2812 → ChannelEngineSpi (clockless-over-SPI) OR RMT/PARLIO
218 return data->isSpi();
219}

References fl::FL_NO_EXCEPT.

Referenced by enqueue().

+ Here is the caller graph for this function: