|
FastLED 3.9.15
|
Multi-lane SPI device (1-8 independent LED strips)
Manages one or more independent data streams that are transposed and transmitted in parallel using hardware DMA (SpiHw1/2/4/8)
Architecture:
Example:
Definition at line 51 of file multi_lane_device.h.
#include <multi_lane_device.h>
Collaboration diagram for fl::spi::MultiLaneDevice:Classes | |
| struct | Config |
| Configuration for multi-lane SPI. More... | |
| struct | Impl |
Public Member Functions | |
| MultiLaneDevice (const Config &config) | |
| Construct multi-lane device. | |
| MultiLaneDevice (const MultiLaneDevice &) FL_NOEXCEPT=delete | |
| MultiLaneDevice (MultiLaneDevice &&) FL_NOEXCEPT=delete | |
| ~MultiLaneDevice () FL_NOEXCEPT | |
| Destructor - releases hardware resources. | |
| fl::optional< fl::task::Error > | begin () |
| Initialize hardware. | |
| void | end () |
| Shutdown hardware and release resources. | |
| Result< void > | flush () |
| Flush all lanes (transpose and transmit) | |
| const Config & | getConfig () const |
| Get current configuration. | |
| bool | isBusy () const |
| Check if transmission is in progress. | |
| bool | isReady () const |
| Check if device is initialized. | |
| Lane & | lane (size_t lane_id) |
| Get access to a specific lane. | |
| size_t | numLanes () const |
| Get number of lanes. | |
| MultiLaneDevice & | operator= (const MultiLaneDevice &) FL_NOEXCEPT=delete |
| MultiLaneDevice & | operator= (MultiLaneDevice &&) FL_NOEXCEPT=delete |
| bool | wait () |
| Convenience method - wait for transmission to complete. | |
| bool | waitComplete (u32 timeout_ms=(fl::numeric_limits< u32 >::max)()) |
| Wait for pending transmission to complete. | |
| template<typename... Spans> | |
| WriteResult | write (Spans &&... lanes) |
| Convenience method - write multiple lanes in parallel (variadic template) | |
Private Member Functions | |
| WriteResult | writeImpl (fl::span< const fl::span< const u8 > > lane_data) |
| Internal implementation - write all lanes atomically. | |
Private Attributes | |
| fl::unique_ptr< Impl > | pImpl |