[][src]Struct bxcan::CanConfig

pub struct CanConfig<I> { /* fields omitted */ }

Configuration proxy to be used with Can::configure().

Implementations

impl<I> CanConfig<I> where
    I: Instance
[src]

pub fn set_bit_timing(&mut self, btr: u32)[src]

Configures the bit timings.

You can use http://www.bittiming.can-wiki.info/ to calculate the btr parameter. Enter parameters as follows:

  • Clock Rate: The input clock speed to the CAN peripheral (not the CPU clock speed). This is the clock rate of the peripheral bus the CAN peripheral is attached to (eg. APB1).
  • Sample Point: Should normally be left at the default value of 87.5%.
  • SJW: Should normally be left at the default value of 1.

Then copy the CAN_BUS_TIME register value from the table and pass it as the btr parameter to this method.

pub fn set_loopback(&mut self, enabled: bool)[src]

Enables or disables loopback mode: Internally connects the TX and RX signals together.

pub fn set_silent(&mut self, enabled: bool)[src]

Enables or disables silent mode: Disconnects the TX signal from the pin.

Auto Trait Implementations

impl<I> RefUnwindSafe for CanConfig<I> where
    I: RefUnwindSafe

impl<I> Send for CanConfig<I> where
    I: Send

impl<I> Sync for CanConfig<I> where
    I: Sync

impl<I> Unpin for CanConfig<I> where
    I: Unpin

impl<I> UnwindSafe for CanConfig<I> where
    I: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.