Adjust how we deal with read/write being different length.

Including some docs about it.
Removing the Rx-enablement for write-only operations.
This commit is contained in:
Bob McWhirter
2021-07-22 09:28:42 -04:00
parent 67283c0cbd
commit 473a83a937
4 changed files with 11 additions and 9 deletions

View File

@ -29,6 +29,9 @@ pub trait FullDuplex<Word>: Spi<Word> + Write<Word> + Read<Word> {
where
Self: 'a;
/// The `read` array must be at least as long as the `write` array,
/// but is guaranteed to only be filled with bytes equal to the
/// length of the `write` array.
fn read_write<'a>(
&'a mut self,
read: &'a mut [Word],