MCPcopy Create free account
hub / github.com/FastLED/FastLED / canHandle

Method canHandle

src/fl/channels/adapters/spi_channel_adapter.cpp.hpp:196–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194}
195
196bool SpiChannelEngineAdapter::canHandle(const ChannelDataPtr& data) const {
197 if (!data) {
198 return false;
199 }
200
201 // ⚠️ CRITICAL: Accept ONLY true SPI chipsets (APA102, SK9822, HD108)
202 // Reject clockless chipsets (WS2812, SK6812) - those use ChannelEngineSpi or RMT
203 //
204 // This is the opposite of ChannelEngineSpi::canHandle(), which should be:
205 // return !data->isSpi(); // Accept clockless, reject true SPI
206 //
207 // Correct routing:
208 // APA102 → SpiChannelEngineAdapter (this adapter)
209 // WS2812 → ChannelEngineSpi (clockless-over-SPI) OR RMT/PARLIO
210 return data->isSpi();
211}
212
213void SpiChannelEngineAdapter::enqueue(ChannelDataPtr channelData) {
214 if (!channelData) {

Callers

nothing calls this directly

Calls 1

isSpiMethod · 0.45

Tested by

no test coverage detected