@@ -68,7 +68,7 @@ impl<T: Write<W>, W> Write<W> for &mut T {
68
68
}
69
69
}
70
70
71
- /// Operation for transactional SPI trait
71
+ /// Operation for ReadWrite::batch
72
72
///
73
73
/// This allows composition of SPI operations into a single bus transaction
74
74
#[ derive( Debug , PartialEq ) ]
@@ -101,7 +101,7 @@ pub trait ReadWrite<W = u8>: Read<W> + Write<W> {
101
101
fn transfer_inplace ( & mut self , words : & mut [ W ] ) -> Result < ( ) , Self :: Error > ;
102
102
103
103
/// Execute multiple actions as part of a single SPI transaction
104
- fn exec < ' a > ( & mut self , operations : & mut [ Operation < ' a , W > ] ) -> Result < ( ) , Self :: Error > ;
104
+ fn batch < ' a > ( & mut self , operations : & mut [ Operation < ' a , W > ] ) -> Result < ( ) , Self :: Error > ;
105
105
}
106
106
107
107
impl < T : ReadWrite < W > , W > ReadWrite < W > for & mut T {
@@ -113,7 +113,7 @@ impl<T: ReadWrite<W>, W> ReadWrite<W> for &mut T {
113
113
T :: transfer_inplace ( self , words)
114
114
}
115
115
116
- fn exec < ' a > ( & mut self , operations : & mut [ Operation < ' a , W > ] ) -> Result < ( ) , Self :: Error > {
117
- T :: exec ( self , operations)
116
+ fn batch < ' a > ( & mut self , operations : & mut [ Operation < ' a , W > ] ) -> Result < ( ) , Self :: Error > {
117
+ T :: batch ( self , operations)
118
118
}
119
119
}
0 commit comments