@@ -5,35 +5,32 @@ pub trait Read<W> {
55 /// Error type
66 type Error ;
77
8- /// Reads enough bytes from the slave to fill `left_words` and `right_words`.
9- fn try_read < ' w > (
10- & mut self ,
11- left_words : & ' w mut [ W ] ,
12- right_words : & ' w mut [ W ] ,
13- ) -> Result < ( ) , Self :: Error > ;
8+ /// Reads enough bytes from the slave to fill `data`.
9+ ///
10+ /// The data is filled up with interleaved data as appropriate.
11+ fn try_read < ' w > ( & mut self , data : & ' w mut [ W ] ) -> Result < ( ) , Self :: Error > ;
1412}
1513
1614/// Blocking write
1715pub trait Write < W > {
1816 /// Error type
1917 type Error ;
2018
21- /// Sends `left_words` and `right_words` to the slave.
22- fn try_write < ' w > (
23- & mut self ,
24- left_words : & ' w [ W ] ,
25- right_words : & ' w [ W ] ,
26- ) -> Result < ( ) , Self :: Error > ;
19+ /// Sends `data` to the slave.
20+ ///
21+ /// The data should be filled with interleaved data as appropriate.
22+ fn try_write < ' w > ( & mut self , data : & ' w [ W ] ) -> Result < ( ) , Self :: Error > ;
2723}
2824
2925/// Blocking write (iterator version)
3026pub trait WriteIter < W > {
3127 /// Error type
3228 type Error ;
3329
34- /// Sends `left_words` and `right_words` to the slave.
35- fn try_write < LW , RW > ( & mut self , left_words : LW , right_words : RW ) -> Result < ( ) , Self :: Error >
30+ /// Sends `data` to the slave.
31+ ///
32+ /// The data should be filled with interleaved data as appropriate.
33+ fn try_write < I > ( & mut self , data : I ) -> Result < ( ) , Self :: Error >
3634 where
37- LW : IntoIterator < Item = W > ,
38- RW : IntoIterator < Item = W > ;
35+ I : IntoIterator < Item = W > ;
3936}
0 commit comments