52 return {0u, 0xFFFFFFFFu};
58 return {hz, 0xFFFFFFFFu};
77 return {0u, 0xFFFFFFFFu};
83 return {ns, 0xFFFFFFFFu};
137 template <fl::size N>
140 for (fl::size i = 0; i < N; ++i) {
142 ps.pins.set(
static_cast<fl::u32
>(arr[i]));
184 return {0u, 0u, 0u, 0u};
345 Protocol p, fl::i16 data, fl::i16 clock,
SPI Device - RAII wrapper for multi-lane SPI.
constexpr bool isYes(HandleResult r) FL_NO_EXCEPT
Convenience: most call sites really want a bool.
fl::bitset_fixed< kPinSetCapacity > PinBitset
@ NoPinPair
clock pin not in the matching group's allowlist
@ NoProtocol
driver doesn't support the requested Protocol
@ NoPin
data pin not in any matching group's allowlist
@ NoCapacity
group full / driver-total cap reached
@ NoTiming
chipset tolerance windows can't be hit
@ NoFrequency
requested freq outside driver/group range
InputGamut g FL_NO_EXCEPT
@ Clockless
Single data line + async timing (WS2812, SK6812, ...)
static constexpr fl::u32 kPinSetCapacity
Maximum pin number representable in a PinSet's bitset.
Base definition for an LED controller.
ChipsetClocklessTiming timing
unspecified/any for Spi requests
ChannelRequest() FL_NO_EXCEPT
PinBitset data_pins
bit N set = pin N included
fl::i16 clock_pin
-1 for Clockless; single shared clock for Spi
fl::optional< fl::u32 > frequency_hz
mostly SPI override
static constexpr ChipsetClocklessTiming unspecified() FL_NO_EXCEPT
fl::u32 base_clock_hz
e.g. 80'000'000 for RMT5 (APB_CLK)
fl::u16 max_divider
largest divider -> coarsest tick width
constexpr bool isUnspecified() const FL_NO_EXCEPT
fl::u16 max_phase_ticks
counter-width cap per phase
static constexpr ClocklessTimingCapability unspecified() FL_NO_EXCEPT
fl::u16 min_divider
smallest divider -> finest tick width
fl::u8 priority
higher = preferred
fl::u8 max_total_channels
aggregate cap; 0 = unbounded
FreqRange clockless_frequency
Aggregate frequency ranges.
fl::string_view name
diagnostics, e.g. "RMT5"
DriverCapabilities() FL_NO_EXCEPT
Definition in capabilities.cpp.hpp.
struct fl::DriverCapabilities::Flags flags
ClocklessTimingCapability clockless_timing
Clock-tree model — the ONLY chipset-support gate.
fl::u8 requires_dma_memory
DMA can't reach PSRAM.
fl::u8 open_drain_capable
fl::u8 mixed_protocols_ok
CL+SPI on same instance OK.
fl::u8 synchronized_start
all groups latch on same clock edge
Peripheral-flavor flags. Default zero = neutral / no claim.
static constexpr FreqRange atMost(fl::u32 hz) FL_NO_EXCEPT
static constexpr FreqRange exactly(fl::u32 hz) FL_NO_EXCEPT
static constexpr FreqRange any() FL_NO_EXCEPT
static constexpr FreqRange atLeast(fl::u32 hz) FL_NO_EXCEPT
constexpr bool isUnspecified() const FL_NO_EXCEPT
constexpr bool contains(fl::u32 hz) const FL_NO_EXCEPT
constexpr bool isUnspecified() const FL_NO_EXCEPT
static constexpr NanosRange exactly(fl::u32 ns) FL_NO_EXCEPT
static constexpr NanosRange any() FL_NO_EXCEPT
static constexpr NanosRange atLeast(fl::u32 ns) FL_NO_EXCEPT
constexpr bool contains(fl::u32 ns) const FL_NO_EXCEPT
static constexpr NanosRange atMost(fl::u32 ns) FL_NO_EXCEPT
bool pins_must_be_contiguous
True iff a bulk request's data_pins bitset must be contiguous (set bits form an unbroken run).
fl::u16 instance_id
opaque ID; used in diagnostics
fl::u8 max_concurrent
how many data_pins can be active concurrently
fl::u8 shared_clock_domain_id
Groups sharing a non-zero shared_clock_domain_id must all run at the same frequency (PARLIO timer,...
Protocol protocol
group is Clockless OR Spi
constexpr PinGroup() FL_NO_EXCEPT
FreqRange frequency
Frequency range for this group's clock.
fl::u8 shared_budget_id
Groups sharing a non-zero shared_budget_id draw concurrent slots from one pool.
PinSet data_pins
data-line allowlist (or AnyOutput)
PinSet clock_pins
clock-line allowlist; None for Clockless
static constexpr PinSet none() FL_NO_EXCEPT
Factory: slot is not applicable.
constexpr PinSet(PinSetKind k, const PinBitset &b) FL_NO_EXCEPT
constexpr PinSet() FL_NO_EXCEPT
bool accepts(fl::i16 pin) const FL_NO_EXCEPT
True iff this set accepts the given single pin.
bool acceptsAll(const PinBitset &request) const FL_NO_EXCEPT
True iff every set bit in request is also accepted here.
static PinSet allowlist(const fl::i16(&arr)[N]) FL_NO_EXCEPT
Factory: allowlist of pins, constructed from a static array.
static PinSet fixed(fl::i16 pin) FL_NO_EXCEPT
Factory: allowlist with a single pin (the "fixed pin" idiom).
constexpr PinSet(PinSetKind k) FL_NO_EXCEPT
PinBitset pins
only meaningful when kind == Allowlist
static constexpr PinSet anyOutput() FL_NO_EXCEPT
Factory: any GPIO output pin in [0, kPinSetCapacity).