Skip to content

Commit 941c8bb

Browse files
committed
Change uart interface to read into a slice
1 parent d9174d2 commit 941c8bb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/futures/serial.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ pub trait Read<Word> {
1111
type Error;
1212

1313
/// The future associated with the `read` method.
14-
type ReadFuture<'a>: Future<Output=Result<Word, Self::Error>> + 'a
14+
type ReadFuture<'a>: Future<Output=Result<(), Self::Error>> + 'a
1515
where
1616
Self: 'a;
1717

18-
/// Reads a single word from the serial interface
19-
fn read<'a>(&'a mut self) -> Self::ReadFuture<'a>;
18+
/// Reads words from the serial interface into the supplied slice.
19+
fn read<'a>(&'a mut self, read: &'a mut [Word]) -> Self::ReadFuture<'a>;
2020
}
2121

2222
/// Write half of a serial interface

0 commit comments

Comments
 (0)