Enum bxcan::Interrupt[][src]

#[non_exhaustive]
pub enum Interrupt {
    TransmitMailboxEmpty,
    Fifo0MessagePending,
    Fifo0Full,
    Fifo0Overrun,
    Fifo1MessagePending,
    Fifo1Full,
    Fifo1Overrun,
    Error,
    Wakeup,
    Sleep,
}
Expand description

bxCAN interrupt sources.

These can be individually enabled and disabled in the bxCAN peripheral. Note that the bxCAN peripheral only exposes 4 interrupts to the microcontroller:

  • TX
  • RX FIFO 1
  • RX FIFO 2
  • SCE (Status Change Error)

This means that some of the interrupts listed here will result in the same interrupt handler being invoked.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
TransmitMailboxEmpty
Expand description

Fires the TX interrupt when one of the transmit mailboxes returns to empty state.

This usually happens because its message was either transmitted successfully, or transmission was aborted successfully.

The interrupt handler must clear the interrupt condition by calling Can::clear_request_completed_flag or Can::clear_tx_interrupt.

Fifo0MessagePending
Expand description

Fires the RX FIFO 0 interrupt when FIFO 0 holds a message.

The interrupt handler must clear the interrupt condition by receiving all messages from the FIFO by calling Can::receive or Rx::receive.

Fifo0Full
Expand description

Fires the RX FIFO 0 interrupt when FIFO 0 holds 3 incoming messages.

The interrupt handler must clear the interrupt condition by receiving at least one message from the FIFO (making it no longer “full”). This can be done by calling Can::receive or Rx::receive.

Fifo0Overrun
Expand description

Fires the RX FIFO 0 interrupt when FIFO 0 drops an incoming message.

The interrupt handler must clear the interrupt condition by calling Can::receive or Rx::receive (which will return an error).

Fifo1MessagePending
Expand description

Fires the RX FIFO 1 interrupt when FIFO 1 holds a message.

Behavior is otherwise identical to Self::Fifo0MessagePending.

Fifo1Full
Expand description

Fires the RX FIFO 1 interrupt when FIFO 1 holds 3 incoming messages.

Behavior is otherwise identical to Self::Fifo0Full.

Fifo1Overrun
Expand description

Fires the RX FIFO 1 interrupt when FIFO 1 drops an incoming message.

Behavior is otherwise identical to Self::Fifo0Overrun.

Error
Wakeup
Expand description

Fires the SCE interrupt when an incoming CAN frame is detected while the peripheral is in sleep mode.

The interrupt handler must clear the interrupt condition by calling Can::clear_wakeup_interrupt.

Sleep
Expand description

Fires the SCE interrupt when the peripheral enters sleep mode.

The interrupt handler must clear the interrupt condition by calling Can::clear_sleep_interrupt.

Trait Implementations

impl BitOrAssign<Interrupt> for Interrupts[src]

Adds an interrupt to the interrupt set.

fn bitor_assign(&mut self, rhs: Interrupt)[src]

Performs the |= operation. Read more

impl Clone for Interrupt[src]

fn clone(&self) -> Interrupt[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Interrupt[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Format for Interrupt[src]

fn format(&self, f: Formatter<'_>)[src]

Writes the defmt representation of self to fmt.

impl From<Interrupt> for Interrupts[src]

fn from(i: Interrupt) -> Self[src]

Performs the conversion.

impl PartialEq<Interrupt> for Interrupt[src]

fn eq(&self, other: &Interrupt) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl Copy for Interrupt[src]

impl Eq for Interrupt[src]

impl StructuralEq for Interrupt[src]

impl StructuralPartialEq for Interrupt[src]

Auto Trait Implementations

impl Send for Interrupt

impl Sync for Interrupt

impl Unpin for Interrupt

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.