Skip to content

Commit 48b4c9b

Browse files
committed
spi/blocking: rename exec to batch
1 parent c248f06 commit 48b4c9b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/spi/blocking.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ impl<T: Write<W>, W> Write<W> for &mut T {
8080
}
8181
}
8282

83-
/// Operation for transactional SPI trait
83+
/// Operation for ReadWrite::batch
8484
///
8585
/// This allows composition of SPI operations into a single bus transaction
8686
#[derive(Debug, PartialEq)]
@@ -112,8 +112,8 @@ pub trait ReadWrite<W = u8>: Read<W> + Write<W> {
112112
/// `words` buffer, overwriting it.
113113
fn transfer_inplace(&mut self, words: &mut [W]) -> Result<(), Self::Error>;
114114

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> {
117117
for op in operations {
118118
match op {
119119
Operation::Read(words) => self.read(words)?,
@@ -135,7 +135,7 @@ impl<T: ReadWrite<W>, W> ReadWrite<W> for &mut T {
135135
T::transfer_inplace(self, words)
136136
}
137137

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)
140140
}
141141
}

0 commit comments

Comments
 (0)