Skip to content

Commit f531998

Browse files
committed
spi/blocking: rename exec to batch
1 parent 9f81e56 commit f531998

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/spi/blocking.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl<T: Write<W>, W> Write<W> for &mut T {
5858
}
5959
}
6060

61-
/// Operation for transactional SPI trait
61+
/// Operation for ReadWrite::batch
6262
///
6363
/// This allows composition of SPI operations into a single bus transaction
6464
#[derive(Debug, PartialEq)]
@@ -91,7 +91,7 @@ pub trait ReadWrite<W = u8>: Read<W> + Write<W> {
9191
fn transfer_inplace(&mut self, words: &mut [W]) -> Result<(), Self::Error>;
9292

9393
/// 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>;
9595
}
9696

9797
impl<T: ReadWrite<W>, W> ReadWrite<W> for &mut T {
@@ -103,7 +103,7 @@ impl<T: ReadWrite<W>, W> ReadWrite<W> for &mut T {
103103
T::transfer_inplace(self, words)
104104
}
105105

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)
108108
}
109109
}

0 commit comments

Comments
 (0)