Trait esp32_hal::rmt::TxChannel

source ·
pub trait TxChannel<const CHANNEL: u8>: TxChannelInternal<CHANNEL> {
    // Provided methods
    fn transmit<'a, T>(
        self,
        data: &'a [T]
    ) -> SingleShotTxTransaction<'a, Self, T, CHANNEL>
       where T: Into<u32> + Copy,
             Self: Sized { ... }
    fn transmit_continuously<'a, T>(
        self,
        data: &'a [T]
    ) -> Result<ContinuousTxTransaction<Self, CHANNEL>, Error>
       where T: Into<u32> + Copy,
             Self: Sized { ... }
    fn transmit_continuously_with_loopcount<'a, T>(
        self,
        loopcount: u16,
        data: &'a [T]
    ) -> Result<ContinuousTxTransaction<Self, CHANNEL>, Error>
       where T: Into<u32> + Copy,
             Self: Sized { ... }
}

Provided Methods§

source

fn transmit<'a, T>( self, data: &'a [T] ) -> SingleShotTxTransaction<'a, Self, T, CHANNEL>
where T: Into<u32> + Copy, 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<'a, T>( self, data: &'a [T] ) -> Result<ContinuousTxTransaction<Self, CHANNEL>, Error>
where T: Into<u32> + Copy, 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<'a, T>( self, loopcount: u16, data: &'a [T] ) -> Result<ContinuousTxTransaction<Self, CHANNEL>, Error>
where T: Into<u32> + Copy, Self: Sized,

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

Object Safety§

This trait is not object safe.

Implementors§

source§

impl TxChannel<0> for Channel<0>

source§

impl TxChannel<1> for Channel<1>

source§

impl TxChannel<2> for Channel<2>

source§

impl TxChannel<3> for Channel<3>

source§

impl TxChannel<4> for Channel<4>

source§

impl TxChannel<5> for Channel<5>

source§

impl TxChannel<6> for Channel<6>

source§

impl TxChannel<7> for Channel<7>