@@ -458,11 +458,11 @@ impl<I2C: Instance, PINS> I2c<I2C, PINS> {
458
458
}
459
459
460
460
self . prepare_read ( addr) ?;
461
- self . read_wo_start ( buffer)
461
+ self . read_wo_prepare ( buffer)
462
462
}
463
463
464
464
/// Reads like normal but does'n genereate start and don't send address
465
- fn read_wo_start ( & mut self , buffer : & mut [ u8 ] ) -> Result < ( ) , Error > {
465
+ fn read_wo_prepare ( & mut self , buffer : & mut [ u8 ] ) -> Result < ( ) , Error > {
466
466
if let Some ( ( last, buffer) ) = buffer. split_last_mut ( ) {
467
467
// Read all bytes but not last
468
468
self . read_bytes ( buffer) ?;
@@ -487,11 +487,11 @@ impl<I2C: Instance, PINS> I2c<I2C, PINS> {
487
487
488
488
pub fn write ( & mut self , addr : u8 , bytes : & [ u8 ] ) -> Result < ( ) , Error > {
489
489
self . prepare_write ( addr) ?;
490
- self . write_wo_start ( bytes)
490
+ self . write_wo_prepare ( bytes)
491
491
}
492
492
493
- /// Reads like normal but does'n genereate start and don't send address
494
- fn write_wo_start ( & mut self , bytes : & [ u8 ] ) -> Result < ( ) , Error > {
493
+ /// Writes like normal but does'n genereate start and don't send address
494
+ fn write_wo_prepare ( & mut self , bytes : & [ u8 ] ) -> Result < ( ) , Error > {
495
495
self . write_bytes ( bytes. iter ( ) . cloned ( ) ) ?;
496
496
497
497
// Send a STOP condition
@@ -566,8 +566,8 @@ impl<I2C: Instance, PINS> I2c<I2C, PINS> {
566
566
567
567
// 4. Now, prev_op is last command use methods variations that will generate stop
568
568
match prev_op {
569
- Operation :: Read ( rb) => self . read_wo_start ( rb) ?,
570
- Operation :: Write ( wb) => self . write_wo_start ( wb) ?,
569
+ Operation :: Read ( rb) => self . read_wo_prepare ( rb) ?,
570
+ Operation :: Write ( wb) => self . write_wo_prepare ( wb) ?,
571
571
} ;
572
572
}
573
573
@@ -607,8 +607,8 @@ impl<I2C: Instance, PINS> I2c<I2C, PINS> {
607
607
608
608
// 4. Now, prev_op is last command use methods variations that will generate stop
609
609
match prev_op {
610
- Operation :: Read ( rb) => self . read_wo_start ( rb) ?,
611
- Operation :: Write ( wb) => self . write_wo_start ( wb) ?,
610
+ Operation :: Read ( rb) => self . read_wo_prepare ( rb) ?,
611
+ Operation :: Write ( wb) => self . write_wo_prepare ( wb) ?,
612
612
} ;
613
613
}
614
614
0 commit comments