TimingBoundaries

Struct TimingBoundaries 

Source
pub struct TimingBoundaries {
    pub prescaler_min: u16,
    pub prescaler_max: u16,
    pub sjw_min: u8,
    pub sjw_max: u8,
    pub tseg1_min: u8,
    pub tseg1_max: u8,
    pub tseg2_min: u8,
    pub tseg2_max: u8,
}
Expand description

Hardware-specific timing parameter boundaries for classical CAN 2.0 bit timing.

These boundaries define the valid ranges for CAN bit timing parameters and are hardware-specific to PEAK-System CAN devices. The values constrain the configuration of the CAN controller’s bit timing to ensure it operates within hardware capabilities.

§Timing Parameters

  • prescaler: Clock prescaler that divides the CAN controller’s base clock
  • sjw (Synchronization Jump Width): Maximum time by which the bit sampling point can be shifted to resynchronize with the bus
  • tseg1 (Time Segment 1): Duration before the sample point, includes propagation delay and phase segment 1
  • tseg2 (Time Segment 2): Duration after the sample point (phase segment 2)

§Usage

These boundaries are used internally by CanBitTiming::new() to validate timing parameters. Users should reference CAN_TIMING_BOUNDARIES to ensure their custom timing configurations fall within acceptable ranges.

Fields§

§prescaler_min: u16§prescaler_max: u16§sjw_min: u8§sjw_max: u8§tseg1_min: u8§tseg1_max: u8§tseg2_min: u8§tseg2_max: u8

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.