Trait TxChannel

Source
pub trait TxChannel: TxChannelInternal {
    // Provided methods
    fn transmit(
        self,
        data: &[u32],
    ) -> Result<SingleShotTxTransaction<'_, Self>, Error>
       where Self: Sized { ... }
    fn transmit_continuously(
        self,
        data: &[u32],
    ) -> Result<ContinuousTxTransaction<Self>, Error>
       where Self: Sized { ... }
    fn transmit_continuously_with_loopcount(
        self,
        loopcount: u16,
        data: &[u32],
    ) -> Result<ContinuousTxTransaction<Self>, Error>
       where Self: Sized { ... }
}
Available on crate feature unstable only.
Expand description

Channel in TX mode

Provided Methods§

Source

fn transmit( self, data: &[u32], ) -> Result<SingleShotTxTransaction<'_, Self>, Error>
where Self: Sized,

Start transmitting the given pulse code sequence. This returns a SingleShotTxTransaction which can be used to wait for the transaction to complete and get back the channel for further use.

Source

fn transmit_continuously( self, data: &[u32], ) -> Result<ContinuousTxTransaction<Self>, Error>
where Self: Sized,

Start transmitting the given pulse code continuously. This returns a ContinuousTxTransaction which can be used to stop the ongoing transmission and get back the channel for further use. The length of sequence cannot exceed the size of the allocated RMT RAM.

Source

fn transmit_continuously_with_loopcount( self, loopcount: u16, data: &[u32], ) -> Result<ContinuousTxTransaction<Self>, Error>
where Self: Sized,

Like Self::transmit_continuously but also sets a loop count. ContinuousTxTransaction can be used to check if the loop count is reached.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§