diff options
Diffstat (limited to 'embassy-embedded-hal/src')
| -rw-r--r-- | embassy-embedded-hal/src/shared_bus/asynch/spi.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/embassy-embedded-hal/src/shared_bus/asynch/spi.rs b/embassy-embedded-hal/src/shared_bus/asynch/spi.rs index b2a9f1e33..5d3cf658a 100644 --- a/embassy-embedded-hal/src/shared_bus/asynch/spi.rs +++ b/embassy-embedded-hal/src/shared_bus/asynch/spi.rs | |||
| @@ -76,9 +76,7 @@ where | |||
| 76 | #[cfg(not(feature = "time"))] | 76 | #[cfg(not(feature = "time"))] |
| 77 | Operation::DelayUs(_) => return Err(SpiDeviceError::DelayUsNotSupported), | 77 | Operation::DelayUs(_) => return Err(SpiDeviceError::DelayUsNotSupported), |
| 78 | #[cfg(feature = "time")] | 78 | #[cfg(feature = "time")] |
| 79 | Operation::DelayUs(us) => { | 79 | Operation::DelayUs(us) => embassy_time::Timer::after_micros(*us as _).await, |
| 80 | embassy_time::Timer::after(embassy_time::Duration::from_micros(*us as _)).await | ||
| 81 | } | ||
| 82 | } | 80 | } |
| 83 | } | 81 | } |
| 84 | }; | 82 | }; |
| @@ -143,9 +141,7 @@ where | |||
| 143 | #[cfg(not(feature = "time"))] | 141 | #[cfg(not(feature = "time"))] |
| 144 | Operation::DelayUs(_) => return Err(SpiDeviceError::DelayUsNotSupported), | 142 | Operation::DelayUs(_) => return Err(SpiDeviceError::DelayUsNotSupported), |
| 145 | #[cfg(feature = "time")] | 143 | #[cfg(feature = "time")] |
| 146 | Operation::DelayUs(us) => { | 144 | Operation::DelayUs(us) => embassy_time::Timer::after_micros(*us as _).await, |
| 147 | embassy_time::Timer::after(embassy_time::Duration::from_micros(*us as _)).await | ||
| 148 | } | ||
| 149 | } | 145 | } |
| 150 | } | 146 | } |
| 151 | }; | 147 | }; |
