Skip to content

Commit 8099f74

Browse files
committed
Added a method that allows to check if there are pending transmits with a given ID
1 parent c9c4f38 commit 8099f74

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/can.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ pub trait Transmitter: Interface {
164164
/// and return it. This is to avoid the priority inversion problem.
165165
fn transmit(&mut self, frame: &Self::Frame) -> nb::Result<Option<Self::Frame>, Self::Error>;
166166

167+
/// Returns true if there exists a pending transmit matching this filter.
168+
fn pending_transmit(&self, filter: &Self::Filter) -> bool;
169+
167170
/// Returns true if a call to `transmit(frame)` (and if the interface supports Can-FD)
168171
/// `transmit_fd(fd_frame)` would return a `Frame` or `WouldBlock`.
169172
fn transmit_buffer_full(&self) -> bool;

0 commit comments

Comments
 (0)