1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! The RMT (remote control) peripheral, which the RGB LED and the IR
//! transmitter share.
use ;
use crateError;
/// The RMT's clock, as [`rmt`] sets it up: the RGB LED's and the IR
/// transmitter's timings are counted in its ticks (0.1 µs).
pub const RMT_FREQUENCY: Rate = from_mhz;
/// Sets up the RMT (remote control) peripheral at [`RMT_FREQUENCY`].
///
/// Pass one of its transmit channels (`channel0` to `channel3`) each to
/// [`rgb_led`] and [`ir_transmitter`]; the others stay free.
///
/// # Errors
///
/// If the RMT can't be clocked at [`RMT_FREQUENCY`] (it can, from the
/// ESP32-S3's 80 MHz).
///
/// [`rgb_led`]: crate::rgb_led
/// [`ir_transmitter`]: crate::ir_transmitter
/// A transmit channel of the RMT, as the RGB LED and the IR transmitter
/// hold it.
pub type RmtTx = ;