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