diff --git a/src/interrupt.rs b/src/interrupt.rs index c5af51e..f02a8cf 100644 --- a/src/interrupt.rs +++ b/src/interrupt.rs @@ -66,41 +66,41 @@ pub enum Interrupt { /// Fires the **SCE** interrupt when the error warning limit (receive or transmit error counter /// >= 96) has been reached. - /// + /// /// [`Interrupt::Error`] must also be enabled for the interrupt to fire. - /// + /// /// The interrupt handler must clear the interrupt condition by calling /// [`Can::clear_error_interrupt`]. ErrorWarning = 1 << 8, /// Fires the **SCE** interrupt when the peripheral enters the error passive state. - /// + /// /// [`Interrupt::Error`] must also be enabled for the interrupt to fire. - /// + /// /// The interrupt handler must clear the interrupt condition by calling /// [`Can::clear_error_interrupt`]. ErrorPassive = 1 << 9, /// Fires the **SCE** interrupt when the peripheral has entered bus-off. - /// + /// /// [`Interrupt::Error`] must also be enabled for the interrupt to fire. - /// + /// /// The interrupt handler must clear the interrupt condition by calling /// [`Can::clear_error_interrupt`]. BusOff = 1 << 10, /// Fires the **SCE** interrupt when the peripheral updates the last error code. - /// + /// /// [`Interrupt::Error`] must also be enabled for the interrupt to fire. - /// + /// /// The interrupt handler must clear the interrupt condition by calling /// [`Can::clear_error_interrupt`]. LastErrorCode = 1 << 11, /// Fires the **SCE** interrupt when the peripheral enters an error state. - /// + /// /// The error states that will cause the interrupt to fire are determined by the subset of - /// [`Interrupt::ErrorWarning`], [`Interrupt::ErrorPassive`], [`Interrupt::BusOff`], and + /// [`Interrupt::ErrorWarning`], [`Interrupt::ErrorPassive`], [`Interrupt::BusOff`], and /// [`Interrupt::LastErrorCode`] that are enabled along with this flag. /// /// The interrupt handler must clear the interrupt condition by calling diff --git a/src/lib.rs b/src/lib.rs index ed51ad5..59b1189 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -155,7 +155,7 @@ impl ErrorStatus { } /// Returns true if the peripheral is currently in bus-off. - /// + /// /// This occurs when the transmit error counter overflows past 255. #[inline] pub fn bus_off(&self) -> bool { @@ -163,7 +163,7 @@ impl ErrorStatus { } /// Returns true if the error passive limit has been reached. - /// + /// /// This occurs when the receive or transmit error counters exceed 127. #[inline] pub fn error_passive(&self) -> bool { @@ -171,7 +171,7 @@ impl ErrorStatus { } /// Returns true if the error warning limit has been reached. - /// + /// /// This occurs when the receive or transmit error counters are greater than or equal 96. #[inline] pub fn error_warning(&self) -> bool { @@ -179,7 +179,6 @@ impl ErrorStatus { } } - /// Error that indicates that an incoming message has been lost due to buffer overrun. #[derive(Debug, Clone, Copy, PartialEq, Eq)] #[cfg_attr(feature = "unstable-defmt", derive(defmt::Format))] @@ -709,7 +708,7 @@ where } /// Clears the error interrupt flag ([`Interrupt::Error`]). - /// + /// /// To read the error status, use [`Can::error_status`] to get the [`ErrorStatus`] before /// clearing the interrupt flag. pub fn clear_error_interrupt(&mut self) { @@ -740,7 +739,7 @@ where }), bus_off: esr.boff().bits, err_passive: esr.epvf().bits, - err_warning: esr.ewgf().bits + err_warning: esr.ewgf().bits, } }