Struct bxcan::Tx[][src]

pub struct Tx<I> { /* fields omitted */ }
Expand description

Interface to the CAN transmitter part.

Implementations

impl<I> Tx<I> where
    I: Instance
[src]

pub fn transmit(&mut self, frame: &Frame) -> Result<Option<Frame>, Infallible>[src]

Puts a CAN frame in a free transmit mailbox for transmission on the bus.

Frames are transmitted to the bus based on their priority (identifier). Transmit order is preserved for frames with identical identifiers. If all transmit mailboxes are full, a higher priority frame replaces the lowest priority frame, which is returned as Ok(Some(frame)).

pub fn transmit_and_get_mailbox(
    &mut self,
    frame: &Frame
) -> Result<(Option<Frame>, Mailbox), Infallible>
[src]

Puts a CAN frame in a free transmit mailbox for transmission on the bus.

This function is equivalent to transmit except that it returns the mailbox that was accessed. This can be used to keep track of additional information about each frame, even when frames are placed into transmit mailboxes and later removed before being transmitted.

pub fn abort(&mut self, mailbox: Mailbox) -> bool[src]

Attempts to abort the sending of a frame that is pending in a mailbox.

If there is no frame in the provided mailbox, this function has no effect and returns false.

If there is a frame in the provided mailbox, this function returns true if the transmission was aborted. This function returns false if the frame was successfully transmitted.

pub fn is_idle(&self) -> bool[src]

Returns true if no frame is pending for transmission.

pub fn clear_interrupt_flags(&mut self)[src]

Clears the request complete flag for all mailboxes.

Auto Trait Implementations

impl<I> Send for Tx<I> where
    I: Send

impl<I> Sync for Tx<I> where
    I: Sync

impl<I> Unpin for Tx<I> where
    I: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.