File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,14 @@ pub trait Transfer<W: 'static> {
12
12
where
13
13
Self : ' a ;
14
14
15
- /// Writes `words` to the slave from the `write` buffer. Puts the words returned in the `read` buffer.
16
- /// This method uses separate `write` and `read` buffers.
15
+ /// Writes and reads simultaneously. `write` is written to the slave on MOSI and
16
+ /// words received on MISO are stored in `read`.
17
+ ///
18
+ /// It is allowed for `read` and `write` to have different lengths, even zero length.
19
+ /// The transfer runs for `max(read.len(), write.len())` words. If `read` is shorter,
20
+ /// incoming words after `read` has been filled will be discarded. If `write` is shorter,
21
+ /// the value of words sent in MOSI after all `write` has been sent is implementation defined,
22
+ /// typically `0x00`, `0xFF`, or configurable.
17
23
fn transfer < ' a > ( & ' a mut self , write : & ' a [ W ] , read : & ' a mut [ W ] ) -> Self :: TransferFuture < ' a > ;
18
24
}
19
25
You can’t perform that action at this time.
0 commit comments