@@ -80,7 +80,7 @@ impl<T: Write<W>, W> Write<W> for &mut T {
80
80
}
81
81
}
82
82
83
- /// Operation for transactional SPI trait
83
+ /// Operation for ReadWrite::batch
84
84
///
85
85
/// This allows composition of SPI operations into a single bus transaction
86
86
#[ derive( Debug , PartialEq ) ]
@@ -112,8 +112,8 @@ pub trait ReadWrite<W = u8>: Read<W> + Write<W> {
112
112
/// `words` buffer, overwriting it.
113
113
fn transfer_inplace ( & mut self , words : & mut [ W ] ) -> Result < ( ) , Self :: Error > ;
114
114
115
- /// Execute multiple actions as part of a single SPI transaction
116
- fn exec < ' a > ( & mut self , operations : & mut [ Operation < ' a , W > ] ) -> Result < ( ) , Self :: Error > {
115
+ /// Execute multiple operations as part of a single SPI transaction
116
+ fn batch < ' a > ( & mut self , operations : & mut [ Operation < ' a , W > ] ) -> Result < ( ) , Self :: Error > {
117
117
for op in operations {
118
118
match op {
119
119
Operation :: Read ( words) => self . read ( words) ?,
@@ -135,7 +135,7 @@ impl<T: ReadWrite<W>, W> ReadWrite<W> for &mut T {
135
135
T :: transfer_inplace ( self , words)
136
136
}
137
137
138
- fn exec < ' a > ( & mut self , operations : & mut [ Operation < ' a , W > ] ) -> Result < ( ) , Self :: Error > {
139
- T :: exec ( self , operations)
138
+ fn batch < ' a > ( & mut self , operations : & mut [ Operation < ' a , W > ] ) -> Result < ( ) , Self :: Error > {
139
+ T :: batch ( self , operations)
140
140
}
141
141
}
0 commit comments