File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ fn main() -> ! {
44
44
45
45
// start separate DMAs for sending and receiving the data
46
46
let sending = tx. write_all ( Pin :: new ( tx_buf) , tx_channel) ;
47
- let receiving = rx. read_all ( Pin :: new ( rx_buf) , rx_channel) ;
47
+ let receiving = rx. read_exact ( Pin :: new ( rx_buf) , rx_channel) ;
48
48
49
49
// block until all data was transmitted and received
50
50
let ( mut tx_buf, tx_channel, tx) = sending. wait ( ) ;
@@ -56,7 +56,7 @@ fn main() -> ! {
56
56
tx_buf. copy_from_slice ( b"hi again!" ) ;
57
57
58
58
let sending = tx. write_all ( tx_buf, tx_channel) ;
59
- let receiving = rx. read_all ( rx_buf, rx_channel) ;
59
+ let receiving = rx. read_exact ( rx_buf, rx_channel) ;
60
60
61
61
let ( tx_buf, ..) = sending. wait ( ) ;
62
62
let ( rx_buf, ..) = receiving. wait ( ) ;
Original file line number Diff line number Diff line change @@ -381,7 +381,7 @@ macro_rules! hal {
381
381
#[ cfg( feature = "stm32f303" ) ]
382
382
impl Rx <$USARTX> {
383
383
/// Fill the buffer with received data using DMA.
384
- pub fn read_all <B , C >(
384
+ pub fn read_exact <B , C >(
385
385
self ,
386
386
mut buffer: Pin <B >,
387
387
mut channel: C
You can’t perform that action at this time.
0 commit comments