Skip to main content

Module rmt

Module rmt 

Source
Expand description

The RMT pulse generator and the two LEDs it drives: the WS2812-class RGB LED (GPIO21) and the IR transmitter (GPIO44).

Both need an RMT channel from one Rmt instance at one clock, so a single RmtResources::init sets up the peripheral and returns both drivers:

ⓘ
let (mut led, mut ir) = board.rmt.init()?;
led.set(0, 32, 0).await?;
ir.send_nec(0x04, 0x08).await?;

Channels 2–3 stay free; build your own from the group’s fields if needed (see crate::led::RgbLed::new for the pattern).

Structs§

RmtResources
The RMT peripheral and the pins of the LEDs it drives.

Constants§

CLOCK
The RMT clock both drivers’ timings assume.