Struct can_bit_timings_core::CanBitTiming [−][src]
This struct holds parts of bit timing for CAN. Field descriptions quote descriptions from this site.
Fields
bs1: u8
bs1 = PROP_SEG + PHASE_SEG1
PROP_SEG is programmable to be 1, 2,... 8 Time Quanta long. It is used to compensate for signal delays across the network.
PHASE_SEG1 is programmable to be 1,2, ... 8 Time Quanta long. It is used to compensate for edge phase errors and may be lengthened during resynchronization.
bs2: u8
bs2 = PHASE_SEG2 (Seg 2) is the maximum of PHASE_SEG1 and the Information Processing Time long. It is also used to compensate edge phase errors and may be shortened during resynchronization. For this the minimum value of PHASE_SEG2 is the value of SJW. Information Processing Time is less than or equal to 2 Time Quanta long.
sjw: u8
Synchronization Jump Width
prescaler: u16
Prescaler value
Implementations
impl CanBitTiming
[src]
pub fn bxcan(&self) -> u32
[src]
Converts CanBitTiming struct to a u32
register
as used by bxcan module.
pub fn total_time_quanta(&self) -> u16
[src]
Outputs total time quanta used to clock a CAN bus module
Trait Implementations
impl Clone for CanBitTiming
[src]
fn clone(&self) -> CanBitTiming
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for CanBitTiming
[src]
impl Debug for CanBitTiming
[src]
impl PartialEq<CanBitTiming> for CanBitTiming
[src]
fn eq(&self, other: &CanBitTiming) -> bool
[src]
fn ne(&self, other: &CanBitTiming) -> bool
[src]
impl PartialOrd<CanBitTiming> for CanBitTiming
[src]
fn partial_cmp(&self, other: &CanBitTiming) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralPartialEq for CanBitTiming
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,