@@ -58,7 +58,7 @@ impl<T: Write<W>, W> Write<W> for &mut T {
58
58
}
59
59
}
60
60
61
- /// Operation for transactional SPI trait
61
+ /// Operation for ReadWrite::batch
62
62
///
63
63
/// This allows composition of SPI operations into a single bus transaction
64
64
#[ derive( Debug , PartialEq ) ]
@@ -91,7 +91,7 @@ pub trait ReadWrite<W = u8>: Read<W> + Write<W> {
91
91
fn transfer_inplace ( & mut self , words : & mut [ W ] ) -> Result < ( ) , Self :: Error > ;
92
92
93
93
/// Execute multiple actions as part of a single SPI transaction
94
- fn exec < ' a > ( & mut self , operations : & mut [ Operation < ' a , W > ] ) -> Result < ( ) , Self :: Error > ;
94
+ fn batch < ' a > ( & mut self , operations : & mut [ Operation < ' a , W > ] ) -> Result < ( ) , Self :: Error > ;
95
95
}
96
96
97
97
impl < T : ReadWrite < W > , W > ReadWrite < W > for & mut T {
@@ -103,7 +103,7 @@ impl<T: ReadWrite<W>, W> ReadWrite<W> for &mut T {
103
103
T :: transfer_inplace ( self , words)
104
104
}
105
105
106
- fn exec < ' a > ( & mut self , operations : & mut [ Operation < ' a , W > ] ) -> Result < ( ) , Self :: Error > {
107
- T :: exec ( self , operations)
106
+ fn batch < ' a > ( & mut self , operations : & mut [ Operation < ' a , W > ] ) -> Result < ( ) , Self :: Error > {
107
+ T :: batch ( self , operations)
108
108
}
109
109
}
0 commit comments