pub struct RxFifoMode(/* private fields */);Expand description
Mode of operation for the RX FIFO
Implementations§
Source§impl RxFifoMode
impl RxFifoMode
Sourcepub fn blocking() -> Self
pub fn blocking() -> Self
Blocking mode
When the RX FIFO is full, incoming messages are dropped until at least one message has been read out from the FIFO.
Sourcepub unsafe fn overwrite() -> Self
pub unsafe fn overwrite() -> Self
Overwriting mode
When the RX FIFO is full, the oldest messsage will be deleted and a new message will take its place.
§Safety
For the RX FIFO running in this mode, MCAN does NOT provide any synchronization primitives that user can rely on in order to guarantee integrity of the data being received.
General guideline from the datasheet suggests that user should never read the oldest element in queue (as there is a risk that the message is currently being overwritten) and index should be offsetted by 1 or more (counting from the oldest message) depending on the speed of the CPU.
Thus, it is up to the application developer to provide such an index offset so read out messages are correct.
Trait Implementations§
Source§impl Clone for RxFifoMode
impl Clone for RxFifoMode
Source§fn clone(&self) -> RxFifoMode
fn clone(&self) -> RxFifoMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more