#[repr(u8)]
pub enum LECSELECT_A {
    NO_ERROR,
    STUFF_ERROR,
    FORM_ERROR,
    ACK_ERROR,
    BIT1_ERROR,
    BIT0_ERROR,
    CRC_ERROR,
    NO_CHANGE,
}
Expand description

Last Error Code (set to 111 on read)

Value on reset: 0

Variants

NO_ERROR

0: No error occurred since LEC has been reset by successful reception or transmission.

STUFF_ERROR

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

FORM_ERROR

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

ACK_ERROR

3: The message transmitted by the MCAN was not acknowledged by another node.

BIT1_ERROR

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

BIT0_ERROR

5: During transmission of a message (or acknowledge bit, or active error flag, or overload flag), the device tried 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 processor to monitor the proceeding of the Bus_Off recovery sequence (indicating the bus is not stuck at dominant or continuously disturbed).

CRC_ERROR

6: The CRC check sum of a received message was incorrect. The CRC of an incoming message does not match the CRC calculated from the received data.

NO_CHANGE

7: Any read access to the Protocol Status Register re-initializes the LEC to ‘7’. When the LEC shows value ‘7’, no CAN bus event was detected since the last processor read access to the Protocol Status Register.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

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

Returns the argument unchanged.

Calls U::from(self).

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

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.