Skip to content

Commit c4a8eb7

Browse files
Document implicit assumption in spi non-blocking trait
1 parent d81cf7c commit c4a8eb7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/spi.rs

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ use nb;
1010
///
1111
/// - Due to how full duplex SPI works each `read` call must be preceded by a `send` call.
1212
///
13+
/// - `read` calls only return the data received with the last `send` call.
14+
/// Previously received data is discarded
15+
///
1316
/// - Some SPIs can work with 8-bit *and* 16-bit words. You can overload this trait with different
1417
/// `Word` types to allow operation in both modes.
1518
pub trait FullDuplex<Word> {

0 commit comments

Comments
 (0)