WS2812_RMT Driver 0.1.0
API reference
Loading...
Searching...
No Matches
Classes | Namespaces | Concepts | Enumerations | Variables
ws2812_rmt_gpio_interface.hpp File Reference

The port of the WS2812_RMT driver: the CRTP base, its pin enums and the Ws2812RmtPort concept. The part is driven by a timed bit stream (bus: [pio]), and the port is the only place that touches an MCU peripheral (on ESP32 the RMT transmitter). More...

#include <concepts>
#include <cstdint>
#include <span>
#include "ws2812_rmt_detail.hpp"
#include "ws2812_rmt_types.hpp"

Go to the source code of this file.

Classes

class  ws2812_rmt::GpioInterface< Derived >
 CRTP base of the platform port. More...
 

Namespaces

namespace  ws2812_rmt
 The WS2812_RMT driver: everything it declares lives here; internals in detail.
 

Concepts

concept  ws2812_rmt::Ws2812RmtPort
 Satisfied by a class that derives from GpioInterface<Port> and implements the required hooks with exactly the types above, noexcept and returning bool (handbook KB-CPP20-006).
 

Enumerations

enum class  ws2812_rmt::CtrlPin : uint8_t { ws2812_rmt::Power }
 Control pins the port may drive through the optional GpioSet() hook. More...
 
enum class  ws2812_rmt::GpioSignal : uint8_t { ws2812_rmt::INACTIVE = 0 , ws2812_rmt::ACTIVE = 1 }
 Logical level of a pin; the port maps it to the physical polarity. More...
 

Variables

constexpr uint32_t ws2812_rmt::kMinResolutionHz = 20'000'000
 
constexpr uint32_t ws2812_rmt::kRecommendedResolutionHz = 20'000'000
 
constexpr uint32_t ws2812_rmt::kRmtHalfSymbolMaxTicks = 32'767
 

Detailed Description

The port of the WS2812_RMT driver: the CRTP base, its pin enums and the Ws2812RmtPort concept. The part is driven by a timed bit stream (bus: [pio]), and the port is the only place that touches an MCU peripheral (on ESP32 the RMT transmitter).

The driver builds the byte stream and resolves the waveform; the port sends it. Derive your class from ws2812_rmt::GpioInterface<Self> and implement, all noexcept (the contract of each hook is in docs/porting.md):