|
FastLED 3.9.15
|
Adapter that wraps HW SPI controllers for ChannelManager.
This adapter enables existing SpiHw1/2/4/8/16 controllers to work with the modern channel-based API while maintaining backward compatibility with SPIBusManager. It uses the Adapter pattern to wrap platform-specific hardware controllers without modification.
Architecture Overview:
Critical Distinction: This adapter is for TRUE SPI chipsets (APA102, SK9822, HD108) that require synchronized clock signals. This is fundamentally different from ChannelEngineSpi, which implements clockless protocols (WS2812) using SPI hardware as a bit-banging driver.
| Adapter | Chipsets | Clock Pin Usage | Purpose |
|---|---|---|---|
| SpiChannelEngineAdapter | APA102, SK9822 | Connected to LEDs | True SPI |
| ChannelEngineSpi | WS2812, SK6812 | Internal only | Clockless-over-SPI |
Priority Scheme: True SPI adapters are registered with higher priority than clockless drivers:
Definition in file spi_channel_adapter.h.
#include "fl/stl/noexcept.h"#include "fl/channels/driver.h"#include "fl/channels/data.h"#include "fl/stl/vector.h"#include "fl/stl/shared_ptr.h"#include "fl/stl/string.h"#include "platforms/shared/spi_hw_base.h"
Include dependency graph for spi_channel_adapter.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| class | fl::SpiChannelEngineAdapter |
| Adapter that wraps HW SPI controllers for ChannelManager. More... | |
| struct | fl::SpiChannelEngineAdapter::ClockPinAssignment |
| struct | fl::SpiChannelEngineAdapter::ClockPinGroup |
| Group data structure for channels with same clock pin. More... | |
| struct | fl::SpiChannelEngineAdapter::ControllerInfo |
| Information about a registered SPI hardware controller. More... | |
Namespaces | |
| namespace | fl |
| Base definition for an LED controller. | |
| struct fl::SpiChannelEngineAdapter::ClockPinAssignment |
| Class Members | ||
|---|---|---|
| int | clockPin | |
| size_t | controllerIndex | Index into mControllers. |
| struct fl::SpiChannelEngineAdapter::ClockPinGroup |
Collaboration diagram for fl::SpiChannelEngineAdapter::ClockPinGroup:| Class Members | ||
|---|---|---|
| vector< ChannelDataPtr > | channels | |
| int | clockPin | |