embedded_hal_can

Trait Receiver

Source
pub trait Receiver: Interface {
    // Required methods
    fn receive(&mut self) -> Result<Self::Frame, Self::Error>;
    fn set_filter(&mut self, filter: Self::Filter);
    fn clear_filter(&mut self);
}
Expand description

A CAN interface that is able to receive frames.

Required Methods§

Source

fn receive(&mut self) -> Result<Self::Frame, Self::Error>

Return the available Frame with the highest priority (lowest ID).

NOTE: Can-FD Frames will not be received using this function.

Source

fn set_filter(&mut self, filter: Self::Filter)

Set the can controller in a mode where it only accept frames matching the given filter.

If there exists several receive buffers, this filter will be applied for all of them.

Note: Even after this method has been called, there may still be Frames in the receive buffer with identifiers that would not been received with this Filter.

Source

fn clear_filter(&mut self)

Set the can controller in a mode where it will accept all frames.

Implementors§