Struct canadensis_bxcan::BxCanDriver
source · pub struct BxCanDriver<C, N>where
C: Clock,
N: Instance,{ /* private fields */ }
Expand description
A CAN driver that wraps a bxCAN device and keeps track of deadlines for queued frames
Implementations§
source§impl<C, N> BxCanDriver<C, N>where
C: Clock,
N: Instance,
impl<C, N> BxCanDriver<C, N>where C: Clock, N: Instance,
sourcepub fn loopback_frame_waiting(&self) -> bool
pub fn loopback_frame_waiting(&self) -> bool
Returns true if at least one loopback frame is ready to receive
Trait Implementations§
source§impl<C, N> ReceiveDriver<C> for BxCanDriver<C, N>where
C: Clock,
N: Instance + FilterOwner,
impl<C, N> ReceiveDriver<C> for BxCanDriver<C, N>where C: Clock, N: Instance + FilterOwner,
§type Error = OverrunError
type Error = OverrunError
This matches the error type defined in bxcan
source§fn receive(&mut self, clock: &mut C) -> Result<Frame<C::Instant>, Self::Error>
fn receive(&mut self, clock: &mut C) -> Result<Frame<C::Instant>, Self::Error>
Tries to receive a frame from the frame receive queue or the loopback frame queue
If both loopback and non-loopback frames are waiting, this function returns a non-loopback frame.
source§fn apply_filters<S>(&mut self, local_node: Option<CanNodeId>, subscriptions: S)where
S: IntoIterator<Item = Subscription>,
fn apply_filters<S>(&mut self, local_node: Option<CanNodeId>, subscriptions: S)where S: IntoIterator<Item = Subscription>,
Sets up frame reception filters to accept only frames matching the provided subscriptions Read more
source§fn apply_accept_all(&mut self)
fn apply_accept_all(&mut self)
Sets up frame reception filters to accept all incoming frames
source§impl<C, N> TransmitDriver<C> for BxCanDriver<C, N>where
C: Clock,
N: Instance,
impl<C, N> TransmitDriver<C> for BxCanDriver<C, N>where C: Clock, N: Instance,
§type Error = Infallible
type Error = Infallible
The error type
source§fn try_reserve(&mut self, frames: usize) -> Result<(), OutOfMemoryError>
fn try_reserve(&mut self, frames: usize) -> Result<(), OutOfMemoryError>
Attempts to reserve space to transmit
frames
additional frames Read more