diff options
| author | xoviat <[email protected]> | 2023-10-01 09:37:20 -0500 |
|---|---|---|
| committer | xoviat <[email protected]> | 2023-10-01 09:37:20 -0500 |
| commit | 5ad34404af9b7cfecfed5075d987c4c03ff2ca27 (patch) | |
| tree | 72f07beb474ef99a94408aba6b9c0362aa454889 /embassy-embedded-hal/src/shared_bus/blocking/spi.rs | |
| parent | a7b1e516504bb0df9f7af42361e4280adcc30417 (diff) | |
eh: update set_config and add get_config
Diffstat (limited to 'embassy-embedded-hal/src/shared_bus/blocking/spi.rs')
| -rw-r--r-- | embassy-embedded-hal/src/shared_bus/blocking/spi.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/embassy-embedded-hal/src/shared_bus/blocking/spi.rs b/embassy-embedded-hal/src/shared_bus/blocking/spi.rs index 6d03d6263..feb0f5b7d 100644 --- a/embassy-embedded-hal/src/shared_bus/blocking/spi.rs +++ b/embassy-embedded-hal/src/shared_bus/blocking/spi.rs | |||
| @@ -163,7 +163,7 @@ where | |||
| 163 | fn transaction(&mut self, operations: &mut [Operation<'_, u8>]) -> Result<(), Self::Error> { | 163 | fn transaction(&mut self, operations: &mut [Operation<'_, u8>]) -> Result<(), Self::Error> { |
| 164 | self.bus.lock(|bus| { | 164 | self.bus.lock(|bus| { |
| 165 | let mut bus = bus.borrow_mut(); | 165 | let mut bus = bus.borrow_mut(); |
| 166 | bus.set_config(&self.config); | 166 | bus.set_config(&self.config).map_err(|_| SpiDeviceError::Config)?; |
| 167 | self.cs.set_low().map_err(SpiDeviceError::Cs)?; | 167 | self.cs.set_low().map_err(SpiDeviceError::Cs)?; |
| 168 | 168 | ||
| 169 | let op_res = operations.iter_mut().try_for_each(|op| match op { | 169 | let op_res = operations.iter_mut().try_for_each(|op| match op { |
