pub struct Rmt<'rmt, Dm>where
Dm: DriverMode,{
pub channel0: ChannelCreator<'rmt, Dm, 0>,
pub channel1: ChannelCreator<'rmt, Dm, 1>,
pub channel2: ChannelCreator<'rmt, Dm, 2>,
pub channel3: ChannelCreator<'rmt, Dm, 3>,
/* private fields */
}Expand description
RMT Instance
Fields§
§channel0: ChannelCreator<'rmt, Dm, 0>RMT Channel 0
channel1: ChannelCreator<'rmt, Dm, 1>RMT Channel 1
channel2: ChannelCreator<'rmt, Dm, 2>RMT Channel 2
channel3: ChannelCreator<'rmt, Dm, 3>RMT Channel 3
Implementations§
Source§impl<'rmt, Dm> Rmt<'rmt, Dm>where
Dm: DriverMode,
impl<'rmt, Dm> Rmt<'rmt, Dm>where
Dm: DriverMode,
Sourcepub fn frequency(&self) -> Rate
pub fn frequency(&self) -> Rate
Returns the configured RMT counter clock frequency.
This is the actual frequency after the global RMT clock divider has been
configured. Pulse code lengths are expressed in cycles of
this clock divided by the channel divider configured with
TxChannelConfig::with_clk_divider or RxChannelConfig::with_clk_divider.
Source§impl<'rmt> Rmt<'rmt, Blocking>
impl<'rmt> Rmt<'rmt, Blocking>
Sourcepub fn into_async(self) -> Rmt<'rmt, Async>
pub fn into_async(self) -> Rmt<'rmt, Async>
Reconfigures the driver for asynchronous operation.
Source§impl<'rmt> Rmt<'rmt, Blocking>
impl<'rmt> Rmt<'rmt, Blocking>
Sourcepub fn new(peripheral: RMT<'rmt>, frequency: Rate) -> Result<Self, ConfigError>
pub fn new(peripheral: RMT<'rmt>, frequency: Rate) -> Result<Self, ConfigError>
Create a new RMT instance.
The frequency parameter configures the global RMT counter clock. Use
Rmt::frequency to retrieve the actual configured frequency when
converting real-time pulse durations to PulseCode lengths; this is
not necessarily the APB clock frequency.
§Errors
This function can return
Sourcepub fn set_interrupt_handler(&mut self, handler: InterruptHandler)
Available on crate feature unstable only.
pub fn set_interrupt_handler(&mut self, handler: InterruptHandler)
unstable only.Registers an interrupt handler for the RMT peripheral.
Note that this will replace any previously registered interrupt handlers.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Trait Implementations§
Source§impl InterruptConfigurable for Rmt<'_, Blocking>
Available on crate feature unstable only.§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
impl InterruptConfigurable for Rmt<'_, Blocking>
unstable only.§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.