pub struct TwaiTx<'d, Dm: DriverMode> { /* private fields */ }
Available on crate feature
unstable
only.Expand description
Interface to the TWAI transmitter part.
Implementations§
Source§impl TwaiTx<'_, Async>
impl TwaiTx<'_, Async>
Sourcepub async fn transmit_async(
&mut self,
frame: &EspTwaiFrame,
) -> Result<(), EspTwaiError>
pub async fn transmit_async( &mut self, frame: &EspTwaiFrame, ) -> Result<(), EspTwaiError>
Transmits an EspTwaiFrame
asynchronously over the TWAI bus.
Source§impl<Dm> TwaiTx<'_, Dm>where
Dm: DriverMode,
impl<Dm> TwaiTx<'_, Dm>where
Dm: DriverMode,
Sourcepub fn transmit(&mut self, frame: &EspTwaiFrame) -> Result<(), EspTwaiError>
pub fn transmit(&mut self, frame: &EspTwaiFrame) -> Result<(), EspTwaiError>
Transmit a frame.
Because of how the TWAI registers are set up, we have to do some assembly of bytes. Note that these registers serve a filter configuration role when the device is in configuration mode so patching the svd files to improve this may be non-trivial.
NOTE: TODO: This may not work if using the self reception/self test functionality. See notes 1 and 2 in the “Frame Identifier” section of the reference manual.