#[repr(u8)]
pub enum LEC_A {
    NONE,
    STUFF,
    FORM,
    ACK,
    BIT1,
    BIT0,
    CRC,
    UNUSED,
}
Expand description

Last Error Code

Value on reset: 0

Variants§

§

NONE

0: No error occurred during last CAN bus event.

§

STUFF

1: More than 5 equal bits in a sequence have occurred in a part of a received message where this is not allowed.

§

FORM

2: A fixed format part of a received frame has the wrong format.

§

ACK

3: The message this CAN Core transmitted was not acknowledged by another node.

§

BIT1

4: During the transmission of a message (with the exception of the arbitration field), the device wanted to send a recessive level (bit of logical value 1), but the monitored bus value was dominant.

§

BIT0

5: During the transmission of a message (or acknowledge bit, or active error flag, or overload flag), the device wanted to send a dominant level (data or identifier bit logical value 0), but the monitored Bus value was recessive. During Bus Off recovery this status is set each time a sequence of 11 recessive bits has been monitored. This enables the CPU to monitor the proceeding of the Bus Off recovery sequence (indicating the bus is not stuck at dominant or continuously disturbed).

§

CRC

6: The CRC check sum was incorrect in the message received; the CRC received for an incoming message does not match with the calculated CRC for the received data.

§

UNUSED

7: When the LEC shows the value ‘7’, no CAN bus event was detected since the CPU wrote this value to the LEC.

Trait Implementations§

source§

impl Clone for LEC_A

source§

fn clone(&self) -> LEC_A

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for LEC_A

source§

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

Formats the value using the given formatter. Read more
source§

impl From<LEC_A> for u8

source§

fn from(variant: LEC_A) -> Self

Converts to this type from the input type.
source§

impl PartialEq<LEC_A> for LEC_A

source§

fn eq(&self, other: &LEC_A) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for LEC_A

source§

impl Eq for LEC_A

source§

impl StructuralEq for LEC_A

source§

impl StructuralPartialEq for LEC_A

Auto Trait Implementations§

§

impl RefUnwindSafe for LEC_A

§

impl Send for LEC_A

§

impl Sync for LEC_A

§

impl Unpin for LEC_A

§

impl UnwindSafe for LEC_A

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.