pub struct FdCanConfig {
pub nbtr: NominalBitTiming,
pub dbtr: DataBitTiming,
pub automatic_retransmit: bool,
pub transmit_pause: bool,
pub frame_transmit: FrameTransmissionConfig,
pub non_iso_mode: bool,
pub edge_filtering: bool,
pub protocol_exception_handling: bool,
pub clock_divider: ClockDivider,
pub timestamp_source: TimestampSource,
pub global_filter: GlobalFilter,
pub tx_buffer_mode: TxBufferMode,
}
Expand description
FdCan Config Struct
Fields§
§nbtr: NominalBitTiming
Nominal Bit Timings
dbtr: DataBitTiming
(Variable) Data Bit Timings
automatic_retransmit: bool
Enables or disables automatic retransmission of messages
If this is enabled, the CAN peripheral will automatically try to retransmit each frame util it can be sent. Otherwise, it will try only once to send each frame.
Automatic retransmission is enabled by default.
transmit_pause: bool
Enabled or disables the pausing between transmissions
This feature looses up burst transmissions coming from a single node and it protects against “babbling idiot” scenarios where the application program erroneously requests too many transmissions.
frame_transmit: FrameTransmissionConfig
Enabled or disables the pausing between transmissions
This feature looses up burst transmissions coming from a single node and it protects against “babbling idiot” scenarios where the application program erroneously requests too many transmissions.
non_iso_mode: bool
Non Isoe Mode If this is set, the FDCAN uses the CAN FD frame format as specified by the Bosch CAN FD Specification V1.0.
edge_filtering: bool
Edge Filtering: Two consecutive dominant tq required to detect an edge for hard synchronization
protocol_exception_handling: bool
Enables protocol exception handling
clock_divider: ClockDivider
Sets the general clock divider for this FdCAN instance
timestamp_source: TimestampSource
Sets the timestamp source
global_filter: GlobalFilter
Configures the Global Filter
tx_buffer_mode: TxBufferMode
TX buffer mode (FIFO or priority queue)
Implementations§
source§impl FdCanConfig
impl FdCanConfig
sourcepub const fn set_nominal_bit_timing(self, btr: NominalBitTiming) -> Self
pub const fn set_nominal_bit_timing(self, btr: NominalBitTiming) -> Self
Configures the bit timings.
sourcepub const fn set_data_bit_timing(self, btr: DataBitTiming) -> Self
pub const fn set_data_bit_timing(self, btr: DataBitTiming) -> Self
Configures the bit timings.
sourcepub const fn set_automatic_retransmit(self, enabled: bool) -> Self
pub const fn set_automatic_retransmit(self, enabled: bool) -> Self
Enables or disables automatic retransmission of messages
If this is enabled, the CAN peripheral will automatically try to retransmit each frame util it can be sent. Otherwise, it will try only once to send each frame.
Automatic retransmission is enabled by default.
sourcepub const fn set_transmit_pause(self, enabled: bool) -> Self
pub const fn set_transmit_pause(self, enabled: bool) -> Self
Enabled or disables the pausing between transmissions
This feature looses up burst transmissions coming from a single node and it protects against “babbling idiot” scenarios where the application program erroneously requests too many transmissions.
sourcepub const fn set_non_iso_mode(self, enabled: bool) -> Self
pub const fn set_non_iso_mode(self, enabled: bool) -> Self
If this is set, the FDCAN uses the CAN FD frame format as specified by the Bosch CAN FD Specification V1.0.
sourcepub const fn set_edge_filtering(self, enabled: bool) -> Self
pub const fn set_edge_filtering(self, enabled: bool) -> Self
Two consecutive dominant tq required to detect an edge for hard synchronization
sourcepub const fn set_frame_transmit(self, fts: FrameTransmissionConfig) -> Self
pub const fn set_frame_transmit(self, fts: FrameTransmissionConfig) -> Self
Sets the allowed transmission types for messages.
sourcepub const fn set_protocol_exception_handling(self, peh: bool) -> Self
pub const fn set_protocol_exception_handling(self, peh: bool) -> Self
Enables protocol exception handling
sourcepub const fn set_clock_divider(self, div: ClockDivider) -> Self
pub const fn set_clock_divider(self, div: ClockDivider) -> Self
Sets the general clock divider for this FdCAN instance
sourcepub const fn set_timestamp_source(self, tss: TimestampSource) -> Self
pub const fn set_timestamp_source(self, tss: TimestampSource) -> Self
Sets the timestamp source
sourcepub const fn set_global_filter(self, filter: GlobalFilter) -> Self
pub const fn set_global_filter(self, filter: GlobalFilter) -> Self
Sets the global filter settings
sourcepub const fn set_tx_buffer_mode(self, txbm: TxBufferMode) -> Self
pub const fn set_tx_buffer_mode(self, txbm: TxBufferMode) -> Self
Sets the TX buffer mode (FIFO or priority queue)
Trait Implementations§
source§impl Clone for FdCanConfig
impl Clone for FdCanConfig
source§fn clone(&self) -> FdCanConfig
fn clone(&self) -> FdCanConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FdCanConfig
impl Debug for FdCanConfig
source§impl Default for FdCanConfig
impl Default for FdCanConfig
impl Copy for FdCanConfig
Auto Trait Implementations§
impl Freeze for FdCanConfig
impl RefUnwindSafe for FdCanConfig
impl Send for FdCanConfig
impl Sync for FdCanConfig
impl Unpin for FdCanConfig
impl UnwindSafe for FdCanConfig
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)