Struct bxcan::CanConfig [−][src]
pub struct CanConfig<'a, I: Instance> { /* fields omitted */ }
Expand description
Configuration proxy to be used with Can::configure()
.
Implementations
impl<I: Instance> CanConfig<'_, I>
[src]
impl<I: Instance> CanConfig<'_, I>
[src]pub fn set_bit_timing(&mut self, btr: u32) -> &mut Self
[src]
pub fn set_bit_timing(&mut self, btr: u32) -> &mut Self
[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) -> &mut Self
[src]
pub fn set_loopback(&mut self, enabled: bool) -> &mut Self
[src]Enables or disables loopback mode: Internally connects the TX and RX signals together.
pub fn set_silent(&mut self, enabled: bool) -> &mut Self
[src]
pub fn set_silent(&mut self, enabled: bool) -> &mut Self
[src]Enables or disables silent mode: Disconnects the TX signal from the pin.
Trait Implementations
Auto Trait Implementations
impl<'a, I> Send for CanConfig<'a, I> where
I: Send,
I: Send,
impl<'a, I> Sync for CanConfig<'a, I> where
I: Sync,
I: Sync,