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 more