#[repr(u8)]
pub enum LEC_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 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_ERROR
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 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 with 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 the value ‘7’, no CAN bus event was detected since the last processor read access to the Protocol Status Register.
Trait Implementations
impl Copy for LEC_A
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more