Skip to content

Commit 3b4b548

Browse files
committed
spi/blocking: rename exec to batch
1 parent b7029c9 commit 3b4b548

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
@@ -68,7 +68,7 @@ impl<T: Write<W>, W> Write<W> for &mut T {
6868
}
6969
}
7070

71-
/// Operation for transactional SPI trait
71+
/// Operation for ReadWrite::batch
7272
///
7373
/// This allows composition of SPI operations into a single bus transaction
7474
#[derive(Debug, PartialEq)]
@@ -101,7 +101,7 @@ pub trait ReadWrite<W = u8>: Read<W> + Write<W> {
101101
fn transfer_inplace(&mut self, words: &mut [W]) -> Result<(), Self::Error>;
102102

103103
/// 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>;
105105
}
106106

107107
impl<T: ReadWrite<W>, W> ReadWrite<W> for &mut T {
@@ -113,7 +113,7 @@ impl<T: ReadWrite<W>, W> ReadWrite<W> for &mut T {
113113
T::transfer_inplace(self, words)
114114
}
115115

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)
118118
}
119119
}

0 commit comments

Comments
 (0)