File tree Expand file tree Collapse file tree 2 files changed +4
-17
lines changed Expand file tree Collapse file tree 2 files changed +4
-17
lines changed Original file line number Diff line number Diff line change @@ -63,11 +63,11 @@ fn main() -> ! {
63
63
64
64
// This will write 8 bytes, then shift out ORC
65
65
66
- // Note : spi.read( &mut cs.degrade(), reference_data, &mut readbuf )
67
- // will fail because reference data is in flash, the copy to
68
- // an array will move it to RAM.
66
+ // Note: ` spi.transfer_split_uneven( &mut cs.degrade(), reference_data, &mut readbuf)`
67
+ // will fail because reference data is in flash, the copy to an array
68
+ // will move it to RAM.
69
69
70
- match spi. read ( & mut cs. degrade ( ) , & test_vec1, & mut readbuf) {
70
+ match spi. transfer_split_uneven ( & mut cs. degrade ( ) , & test_vec1, & mut readbuf) {
71
71
Ok ( _) => {
72
72
for i in 0 ..test_vec1. len ( ) {
73
73
tests_ok &= test_vec1[ i] == readbuf[ i] ;
Original file line number Diff line number Diff line change @@ -220,19 +220,6 @@ where
220
220
Ok ( ( ) )
221
221
}
222
222
223
- /// Read from an SPI slave.
224
- ///
225
- /// This method is deprecated. Consider using `transfer` or `transfer_split`.
226
- #[ inline( always) ]
227
- pub fn read (
228
- & mut self ,
229
- chip_select : & mut Pin < Output < PushPull > > ,
230
- tx_buffer : & [ u8 ] ,
231
- rx_buffer : & mut [ u8 ] ,
232
- ) -> Result < ( ) , Error > {
233
- self . transfer_split_uneven ( chip_select, tx_buffer, rx_buffer)
234
- }
235
-
236
223
/// Read and write from a SPI slave, using a single buffer.
237
224
///
238
225
/// This method implements a complete read transaction, which consists of
You can’t perform that action at this time.
0 commit comments