Skip to content

Commit ad6f1d8

Browse files
committed
spi/blocking: rename exec to batch
1 parent 4ffa5da commit ad6f1d8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/spi/blocking.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ impl<T: Write<W>, W> Write<W> for &mut T {
8484
}
8585
}
8686

87-
/// Operation for transactional SPI trait
87+
/// Operation for ReadWrite::batch
8888
///
8989
/// This allows composition of SPI operations into a single bus transaction
9090
#[derive(Debug, PartialEq)]
@@ -116,8 +116,8 @@ pub trait ReadWrite<W>: Read<W> + Write<W> {
116116
/// `words` buffer, overwriting it.
117117
fn transfer_inplace(&mut self, words: &mut [W]) -> Result<(), Self::Error>;
118118

119-
/// Execute multiple actions as part of a single SPI transaction
120-
fn exec<'a>(&mut self, operations: &mut [Operation<'a, W>]) -> Result<(), Self::Error> {
119+
/// Execute multiple operations as part of a single SPI transaction
120+
fn batch<'a>(&mut self, operations: &mut [Operation<'a, W>]) -> Result<(), Self::Error> {
121121
for op in operations {
122122
match op {
123123
Operation::Read(words) => self.read(words)?,
@@ -139,7 +139,7 @@ impl<T: ReadWrite<W>, W> ReadWrite<W> for &mut T {
139139
T::transfer_inplace(self, words)
140140
}
141141

142-
fn exec<'a>(&mut self, operations: &mut [Operation<'a, W>]) -> Result<(), Self::Error> {
143-
T::exec(self, operations)
142+
fn batch<'a>(&mut self, operations: &mut [Operation<'a, W>]) -> Result<(), Self::Error> {
143+
T::batch(self, operations)
144144
}
145145
}

0 commit comments

Comments
 (0)