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

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

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

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

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

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

Behavior is otherwise identical to Self::Fifo0MessagePending.

Fifo1Full

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

Behavior is otherwise identical to Self::Fifo0Full.

Fifo1Overrun

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

Behavior is otherwise identical to Self::Fifo0Overrun.

Error
Wakeup

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

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

Adds an interrupt to the interrupt set.

Performs the |= operation. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

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

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.