Struct stm32_metapac::can::regs::Psr
#[repr(transparent)]pub struct Psr(pub u32);
Expand description
FDCAN protocol status register
Tuple Fields§
§0: u32
Implementations§
§impl Psr
impl Psr
pub const fn lec(&self) -> Lec
pub const fn lec(&self) -> Lec
Last error code. The LEC indicates the type of the last error to occur on the CAN bus. This field is cleared to 0 when a message has been transferred (reception or transmission) without error. Access type is RS: set on read.
pub fn set_lec(&mut self, val: Lec)
pub fn set_lec(&mut self, val: Lec)
Last error code. The LEC indicates the type of the last error to occur on the CAN bus. This field is cleared to 0 when a message has been transferred (reception or transmission) without error. Access type is RS: set on read.
pub const fn dlec(&self) -> u8
pub const fn dlec(&self) -> u8
Data last error code. Type of last error that occurred in the data phase of a FDCAN format frame with its BRS flag set. Coding is the same as for LEC. This field is cleared to 0 when a FDCAN format frame with its BRS flag set has been transferred (reception or transmission) without error. Access type is RS: set on read.
pub fn set_dlec(&mut self, val: u8)
pub fn set_dlec(&mut self, val: u8)
Data last error code. Type of last error that occurred in the data phase of a FDCAN format frame with its BRS flag set. Coding is the same as for LEC. This field is cleared to 0 when a FDCAN format frame with its BRS flag set has been transferred (reception or transmission) without error. Access type is RS: set on read.
pub const fn resi(&self) -> bool
pub const fn resi(&self) -> bool
ESI flag of last received FDCAN message. This bit is set together with REDL, independent of acceptance filtering. Access type is RX: reset on read.
pub fn set_resi(&mut self, val: bool)
pub fn set_resi(&mut self, val: bool)
ESI flag of last received FDCAN message. This bit is set together with REDL, independent of acceptance filtering. Access type is RX: reset on read.
pub const fn rbrs(&self) -> bool
pub const fn rbrs(&self) -> bool
BRS flag of last received FDCAN message. This bit is set together with REDL, independent of acceptance filtering. Access type is RX: reset on read.
pub fn set_rbrs(&mut self, val: bool)
pub fn set_rbrs(&mut self, val: bool)
BRS flag of last received FDCAN message. This bit is set together with REDL, independent of acceptance filtering. Access type is RX: reset on read.
pub const fn redl(&self) -> bool
pub const fn redl(&self) -> bool
Received FDCAN message. This bit is set independent of acceptance filtering. Access type is RX: reset on read.
pub fn set_redl(&mut self, val: bool)
pub fn set_redl(&mut self, val: bool)
Received FDCAN message. This bit is set independent of acceptance filtering. Access type is RX: reset on read.
pub const fn tdcv(&self) -> u8
pub const fn tdcv(&self) -> u8
Transmitter delay compensation value. Position of the secondary sample point, defined by the sum of the measured delay from FDCAN_TX to FDCAN_RX and TDCR.TDCO. The SSP position is, in the data phase, the number of minimum time quanta (mtq) between the start of the transmitted bit and the secondary sample point. Valid values are 0 to 127 mtq
pub fn set_tdcv(&mut self, val: u8)
pub fn set_tdcv(&mut self, val: u8)
Transmitter delay compensation value. Position of the secondary sample point, defined by the sum of the measured delay from FDCAN_TX to FDCAN_RX and TDCR.TDCO. The SSP position is, in the data phase, the number of minimum time quanta (mtq) between the start of the transmitted bit and the secondary sample point. Valid values are 0 to 127 mtq
Trait Implementations§
impl Copy for Psr
impl Eq for Psr
impl StructuralPartialEq for Psr
Auto Trait Implementations§
impl Freeze for Psr
impl RefUnwindSafe for Psr
impl Send for Psr
impl Sync for Psr
impl Unpin for Psr
impl UnwindSafe for Psr
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)