Struct stm32_metapac::can::regs::Dbtp
#[repr(transparent)]pub struct Dbtp(pub u32);
Expand description
FDCAN data bit timing and prescaler register
Tuple Fields§
§0: u32
Implementations§
§impl Dbtp
impl Dbtp
pub const fn dsjw(&self) -> u8
pub const fn dsjw(&self) -> u8
Synchronization jump width. Must always be smaller than DTSEG2, valid values are 0 to 15. The value used by the hardware is the one programmed, incremented by 1: tSJW = (DSJW + 1) x tq.
pub fn set_dsjw(&mut self, val: u8)
pub fn set_dsjw(&mut self, val: u8)
Synchronization jump width. Must always be smaller than DTSEG2, valid values are 0 to 15. The value used by the hardware is the one programmed, incremented by 1: tSJW = (DSJW + 1) x tq.
pub const fn dtseg2(&self) -> u8
pub const fn dtseg2(&self) -> u8
Data time segment after sample point. Valid values are 0 to 15. The value used by the hardware is the one programmed, incremented by 1, i.e. tBS2 = (DTSEG2 + 1) x tq
pub fn set_dtseg2(&mut self, val: u8)
pub fn set_dtseg2(&mut self, val: u8)
Data time segment after sample point. Valid values are 0 to 15. The value used by the hardware is the one programmed, incremented by 1, i.e. tBS2 = (DTSEG2 + 1) x tq
pub const fn dtseg1(&self) -> u8
pub const fn dtseg1(&self) -> u8
Data time segment before sample point. Valid values are 0 to 31. The value used by the hardware is the one programmed, incremented by 1, i.e. tBS1 = (DTSEG1 + 1) x tq
pub fn set_dtseg1(&mut self, val: u8)
pub fn set_dtseg1(&mut self, val: u8)
Data time segment before sample point. Valid values are 0 to 31. The value used by the hardware is the one programmed, incremented by 1, i.e. tBS1 = (DTSEG1 + 1) x tq
pub const fn dbrp(&self) -> u8
pub const fn dbrp(&self) -> u8
Data bit rate prescaler. The value by which the oscillator frequency is divided to generate the bit time quanta. The bit time is built up from a multiple of this quanta. Valid values for the Baud Rate Prescaler are 0 to 31. The hardware interpreters this value as the value programmed plus 1
pub fn set_dbrp(&mut self, val: u8)
pub fn set_dbrp(&mut self, val: u8)
Data bit rate prescaler. The value by which the oscillator frequency is divided to generate the bit time quanta. The bit time is built up from a multiple of this quanta. Valid values for the Baud Rate Prescaler are 0 to 31. The hardware interpreters this value as the value programmed plus 1