We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent afe2251 commit 3c0895cCopy full SHA for 3c0895c
1 file changed
embedded-can/src/asynch.rs
@@ -12,7 +12,15 @@ pub trait CanTx {
12
13
/// Puts a frame in the transmit buffer or awaits until space is available
14
/// in the transmit buffer.
15
- fn transmit(&mut self, frame: &Self::Frame) -> impl Future<Output = Result<(), Self::Error>>;
+ ///
16
+ /// If the transmit buffer is full, this function will try to replace a
17
+ /// pending lower priority frame and return the frame that was replaced. If
18
+ /// no lower-priority frames can be replaced, this call should wait for a
19
+ /// frame to be transmitted and then try again.
20
+ fn transmit(
21
+ &mut self,
22
+ frame: &Self::Frame,
23
+ ) -> impl Future<Output = Result<Option<Self::Frame>, Self::Error>>;
24
}
25
26
/// An async CAN interface that is able to receive frames.
0 commit comments