File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed
Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change 11//! Async CAN API
22
3- /// An async CAN interface that is able to transmit and receive frames.
4- pub trait Can {
3+ /// An async CAN interface that is able to transmit frames.
4+ pub trait CanTx {
55 /// Associated frame type.
66 type Frame : crate :: Frame ;
77
88 /// Associated error type.
99 type Error : crate :: Error ;
1010
11- /// Puts a frame in the transmit buffer.
12- /// Awaits until space is available in the transmit buffer.
11+ /// Puts a frame in the transmit buffer or awaits until space is available
12+ /// in the transmit buffer.
1313 async fn transmit ( & mut self , frame : & Self :: Frame ) -> Result < ( ) , Self :: Error > ;
14+ }
15+
16+ /// An async CAN interface that is able to receive frames.
17+ pub trait CanRx {
18+ /// Associated frame type.
19+ type Frame : crate :: Frame ;
20+
21+ /// Associated error type.
22+ type Error : crate :: Error ;
1423
15- /// Awaits until a frame was received or an error occurred .
24+ /// Awaits until a frame was received or an error occurs .
1625 async fn receive ( & mut self ) -> Result < Self :: Frame , Self :: Error > ;
1726}
You can’t perform that action at this time.
0 commit comments