| 194 | } |
| 195 | |
| 196 | bool 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 | |
| 213 | void SpiChannelEngineAdapter::enqueue(ChannelDataPtr channelData) { |
| 214 | if (!channelData) { |