Struct embassy_stm32::can::CanTx
source · pub struct CanTx<'c, 'd, T: Instance> { /* private fields */ }
Expand description
CAN driver, transmit half.
Implementations§
source§impl<'c, 'd, T: Instance> CanTx<'c, 'd, T>
impl<'c, 'd, T: Instance> CanTx<'c, 'd, T>
sourcepub async fn write(&mut self, frame: &Frame) -> TransmitStatus
pub async fn write(&mut self, frame: &Frame) -> TransmitStatus
Queues the message to be sent.
If the TX queue is full, this will wait until there is space, therefore exerting backpressure.
sourcepub fn try_write(
&mut self,
frame: &Frame
) -> Result<TransmitStatus, TryWriteError>
pub fn try_write( &mut self, frame: &Frame ) -> Result<TransmitStatus, TryWriteError>
Attempts to transmit a frame without blocking.
Returns [Err(TryWriteError::Full)] if all transmit mailboxes are full.
Auto Trait Implementations§
impl<'c, 'd, T> Freeze for CanTx<'c, 'd, T>
impl<'c, 'd, T> RefUnwindSafe for CanTx<'c, 'd, T>where
T: RefUnwindSafe,
impl<'c, 'd, T> Send for CanTx<'c, 'd, T>where
T: Send,
impl<'c, 'd, T> Sync for CanTx<'c, 'd, T>where
T: Sync,
impl<'c, 'd, T> Unpin for CanTx<'c, 'd, T>
impl<'c, 'd, T> !UnwindSafe for CanTx<'c, 'd, T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more