File tree 1 file changed +3
-11
lines changed
1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ pub trait Frame: Sized {
42
42
fn data ( & self ) -> & [ u8 ] ;
43
43
}
44
44
45
- /// A CAN interface that is able to transmit frames.
46
- pub trait Transmitter {
45
+ /// A CAN interface that is able to transmit and receive frames.
46
+ pub trait Can {
47
47
/// Associated frame type.
48
48
type Frame : Frame ;
49
49
@@ -54,16 +54,8 @@ pub trait Transmitter {
54
54
///
55
55
/// If the buffer is full, this function will try to replace a lower priority frame
56
56
/// and return it. This is to avoid the priority inversion problem.
57
+ /// Transmits frames of equal identifier in FIFO fashion.
57
58
fn transmit ( & mut self , frame : & Self :: Frame ) -> nb:: Result < Option < Self :: Frame > , Self :: Error > ;
58
- }
59
-
60
- /// A CAN interface that is able to receive frames.
61
- pub trait Receiver {
62
- /// Associated frame type.
63
- type Frame : Frame ;
64
-
65
- /// Associated error type.
66
- type Error ;
67
59
68
60
/// Returns a received frame if available.
69
61
fn receive ( & mut self ) -> nb:: Result < Self :: Frame , Self :: Error > ;
You can’t perform that action at this time.
0 commit comments