|
WS2812_RMT Driver 0.1.0
API reference
|
Public types of the WS2812_RMT driver: errors, Result<T>, colours, the timing profile of every supported part, Waveform and Config.
More...
#include <array>#include <cstddef>#include <cstdint>#include "ws2812_rmt_detail.hpp"#include "ws2812_rmt_version.h"Go to the source code of this file.
Classes | |
| struct | ws2812_rmt::Result< T > |
| The value of a call, or why there is none. More... | |
| struct | ws2812_rmt::Result< void > |
| The result of a call that returns no value. More... | |
| struct | ws2812_rmt::Colour |
A pixel colour, 8 bit per channel; w is used only by four-channel orders. More... | |
| struct | ws2812_rmt::ColourOrder |
| The order of the channels on the wire, first sent first. More... | |
| struct | ws2812_rmt::Range |
| A timing window in nanoseconds, with the value the driver aims for. More... | |
| struct | ws2812_rmt::Timing |
| The wire timing of one window set. More... | |
| struct | ws2812_rmt::Waveform |
What the port needs to send the frame, in ticks of resolution_hz. More... | |
| struct | ws2812_rmt::Limits |
The four limits of a Timing (a parameter group of MakeTiming()). More... | |
| struct | ws2812_rmt::Config |
Everything EnsureInitialized() uses. The defaults suit a current WS2812B (V5, V6). More... | |
Namespaces | |
| namespace | ws2812_rmt |
The WS2812_RMT driver: everything it declares lives here; internals in detail. | |
Functions | |
| constexpr const char * | ws2812_rmt::ToString (Error error) noexcept |
| The name of an error, for logs. | |
| constexpr Range | ws2812_rmt::MakeRange (uint32_t min_ns, uint32_t max_ns, uint32_t nominal_ns) noexcept |
| A timing window from its three numbers. | |
| constexpr Limits | ws2812_rmt::MakeLimits (uint32_t period_min_ns, uint32_t period_max_ns, uint32_t reset_min_ns, uint32_t max_low_ns) noexcept |
| The limits of a timing from their four numbers. | |
| constexpr Timing | ws2812_rmt::MakeTiming (const Range &t0h, const Range &t0l, const Range &t1h, const Range &t1l, const Limits &limits) noexcept |
| A timing from its four windows and its limits. | |
| constexpr Timing | ws2812_rmt::ProfileTiming (Variant variant) noexcept |
| The window set of a named variant, as nanoseconds. Values are the intersection of the windows of every document of that variant (docs/timing.md, section "Profiles"). | |
| constexpr ColourOrder | ws2812_rmt::DefaultOrder (Variant variant) noexcept |
The colour order a named variant uses unless Config overrides it. | |
| constexpr const char * | ws2812_rmt::GetDriverVersion () noexcept |
| constexpr uint32_t | ws2812_rmt::GetDriverVersionMajor () noexcept |
| constexpr uint32_t | ws2812_rmt::GetDriverVersionMinor () noexcept |
| constexpr uint32_t | ws2812_rmt::GetDriverVersionPatch () noexcept |
Variables | |
| constexpr ColourOrder | ws2812_rmt::kOrderGrb |
| Green, red, blue: the wire order of every WS2812 and SK6812 RGB part. | |
| constexpr ColourOrder | ws2812_rmt::kOrderRgb |
| Red, green, blue. | |
| constexpr ColourOrder | ws2812_rmt::kOrderGrbw |
Green, red, blue, white: SK6812RGBW Rev 07 (the default for Variant::Sk6812Rgbw). | |
| constexpr ColourOrder | ws2812_rmt::kOrderRgbw |
| Red, green, blue, white: SK6812RGBW Rev 01 and Rev 03. | |
| constexpr uint32_t | ws2812_rmt::kMaxDurationNs = 100'000 |
Longest single high or low duration a Custom timing may name, in ns (covers 400 kbit/s). | |
| constexpr uint32_t | ws2812_rmt::kMaxPeriodNs = 200'000 |
Longest period a Custom timing may name, in ns. | |
| constexpr uint32_t | ws2812_rmt::kMaxResetUs = 10'000 |
Longest reset a timing or Config::reset_us may name, in microseconds. | |
| constexpr uint32_t | ws2812_rmt::kResetMarginUs = 20 |
Added to the datasheet reset minimum when Config::reset_us is 0, in microseconds (A-3). | |
| constexpr size_t | ws2812_rmt::kMaxPixels = 65'536 |
| Largest strip the driver accepts, in pixels. | |
| constexpr uint32_t | ws2812_rmt::kMaxSettleUs = 1'000'000 |
Longest power-on settle Config may ask for, in microseconds. | |
| constexpr uint32_t | ws2812_rmt::kMaxSlackMs = 60'000 |
Longest transmit slack Config may ask for, in milliseconds. | |
| constexpr uint32_t | ws2812_rmt::kMaxResolutionHz = 1'000'000'000 |
| The highest tick rate the driver accepts from a port, in Hz. | |
| constexpr uint32_t | ws2812_rmt::kMaxSupplyMv = 6000 |
Supplies above this count as 6 V in MinLogicHighMv() (the absolute maximum is 5.3 V). | |
| constexpr uint32_t | ws2812_rmt::kV5MinHighMv = 2700 |
The fixed floor of VIH of the V5 family, in millivolts (V5.0, datasheet p.2); later revisions print a fraction of VDD instead (MinLogicHighMv()). | |
| constexpr uint32_t | ws2812_rmt::kSk6812MinHighMv = 3400 |
The 3.4 V input high level of the SK6812 family at 5 V, in millivolts: the minimum of SK6812RGBW Rev 01 and Rev 03 (p.4), the typical value of SK6812 RGB Rev 01 (p.4, which prints no minimum). SK6812RGBX Rev 07 prints 0.7 x VDD instead (p.6); MinLogicHighMv() takes the larger. | |
Public types of the WS2812_RMT driver: errors, Result<T>, colours, the timing profile of every supported part, Waveform and Config.
The parts are single-wire addressable LEDs (WS2812 and WS2812B in every published timing generation, WS2812C, WS2812D, SK6812, SK6812RGBW, SK6812MINI) with one 24 bit (32 bit for RGBW) NRZ frame at about 800 kbit/s: a bit is a high pulse then a low pulse, its value is the length of the high pulse, and a low longer than the reset time latches the frame. The family shares the frame; the timing windows, the reset time, the colour order and the channel count differ, and those are the data of this header (docs/timing.md and docs/datasheet.md give each value its document and page).