15#include "platforms/shared/spi_types.h"
168 template<typename... Spans>
175 for (
size_t i = 0; i <
sizeof...(lanes); i++) {
void push_back(const T &value) FL_NO_EXCEPT
Single lane in a multi-lane SPI device.
bool waitComplete(u32 timeout_ms=(fl::numeric_limits< u32 >::max)()) FL_NO_EXCEPT
Wait for pending transmission to complete.
WriteResult write(Spans &&... lanes) FL_NO_EXCEPT
Convenience method - write multiple lanes in parallel (variadic template)
MultiLaneDevice(const Config &config) FL_NO_EXCEPT
Construct multi-lane device.
const Config & getConfig() const FL_NO_EXCEPT
Get current configuration.
bool wait() FL_NO_EXCEPT
Convenience method - wait for transmission to complete.
Lane & lane(size_t lane_id) FL_NO_EXCEPT
Get access to a specific lane.
Result< void > flush() FL_NO_EXCEPT
Flush all lanes (transpose and transmit)
bool isBusy() const FL_NO_EXCEPT
Check if transmission is in progress.
fl::unique_ptr< Impl > pImpl
void end() FL_NO_EXCEPT
Shutdown hardware and release resources.
size_t numLanes() const FL_NO_EXCEPT
Get number of lanes.
WriteResult writeImpl(fl::span< const fl::span< const u8 > > lane_data) FL_NO_EXCEPT
Internal implementation - write all lanes atomically.
fl::optional< fl::task::Error > begin() FL_NO_EXCEPT
Initialize hardware.
~MultiLaneDevice() FL_NO_EXCEPT
Destructor - releases hardware resources.
bool isReady() const FL_NO_EXCEPT
Check if device is initialized.
Configuration structure for SPI communication.
constexpr T && forward(typename remove_reference< T >::type &t) FL_NO_EXCEPT
fl::result< T, SPIError > Result
constexpr common_type_t< T, U > max(T a, U b) FL_NO_EXCEPT
constexpr size_t MAX_SPI_LANES
Maximum number of SPI lanes supported (hardware: 1-8, software: up to 32)
u8 u8 fract8 blur_amount FL_NO_EXCEPT
Base definition for an LED controller.
Promise-based fluent API for FastLED - standalone async primitives.
Result of a write operation.
u32 clock_speed_hz
Clock speed in Hz (0xffffffff = as fast as possible)
u8 mode
SPI mode (CPOL/CPHA)
u8 clock_pin
Shared clock pin (SCK)
fl::vector< u8 > data_pins
Data pins (1-8 pins)
Transaction class for asynchronous SPI operations.
Result type for SPI write operations.