pub struct TwaiRx<'d, Dm: DriverMode> { /* private fields */ }Expand description
Interface to the TWAI receiver part.
Implementations§
Source§impl TwaiRx<'_, Async>
impl TwaiRx<'_, Async>
Sourcepub async fn receive_async(&mut self) -> Result<EspTwaiFrame, EspTwaiError>
pub async fn receive_async(&mut self) -> Result<EspTwaiFrame, EspTwaiError>
Receives an EspTwaiFrame asynchronously over the TWAI bus.
Source§impl<Dm> TwaiRx<'_, Dm>where
Dm: DriverMode,
impl<Dm> TwaiRx<'_, Dm>where
Dm: DriverMode,
Sourcepub fn error_counts(&self) -> ErrorCounts
Available on crate feature unstable only.
pub fn error_counts(&self) -> ErrorCounts
unstable only.What the controller has reported since the driver was started (see
ErrorCounts)
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub fn receive(&mut self) -> Result<EspTwaiFrame, EspTwaiError>
pub fn receive(&mut self) -> Result<EspTwaiFrame, EspTwaiError>
Receives a frame.