diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-07-04 19:53:06 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2023-07-04 19:59:36 +0200 |
| commit | a101d9078deb3ad576a40b6d5f4d6e81dcfd528e (patch) | |
| tree | 98deed296973aa29dc1701f69ecbe342d2a2c7c5 /embassy-embedded-hal/src/shared_bus/mod.rs | |
| parent | b2f843a4ce2dc9114a135f612e1a408a8fe02fab (diff) | |
update embedded-hal crates.
Diffstat (limited to 'embassy-embedded-hal/src/shared_bus/mod.rs')
| -rw-r--r-- | embassy-embedded-hal/src/shared_bus/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/embassy-embedded-hal/src/shared_bus/mod.rs b/embassy-embedded-hal/src/shared_bus/mod.rs index 617d921e9..79a90bd52 100644 --- a/embassy-embedded-hal/src/shared_bus/mod.rs +++ b/embassy-embedded-hal/src/shared_bus/mod.rs | |||
| @@ -30,11 +30,14 @@ where | |||
| 30 | /// Error returned by SPI device implementations in this crate. | 30 | /// Error returned by SPI device implementations in this crate. |
| 31 | #[derive(Copy, Clone, Eq, PartialEq, Debug)] | 31 | #[derive(Copy, Clone, Eq, PartialEq, Debug)] |
| 32 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | 32 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] |
| 33 | #[non_exhaustive] | ||
| 33 | pub enum SpiDeviceError<BUS, CS> { | 34 | pub enum SpiDeviceError<BUS, CS> { |
| 34 | /// An operation on the inner SPI bus failed. | 35 | /// An operation on the inner SPI bus failed. |
| 35 | Spi(BUS), | 36 | Spi(BUS), |
| 36 | /// Setting the value of the Chip Select (CS) pin failed. | 37 | /// Setting the value of the Chip Select (CS) pin failed. |
| 37 | Cs(CS), | 38 | Cs(CS), |
| 39 | /// DelayUs operations are not supported when the `time` Cargo feature is not enabled. | ||
| 40 | DelayUsNotSupported, | ||
| 38 | } | 41 | } |
| 39 | 42 | ||
| 40 | impl<BUS, CS> spi::Error for SpiDeviceError<BUS, CS> | 43 | impl<BUS, CS> spi::Error for SpiDeviceError<BUS, CS> |
| @@ -46,6 +49,7 @@ where | |||
| 46 | match self { | 49 | match self { |
| 47 | Self::Spi(e) => e.kind(), | 50 | Self::Spi(e) => e.kind(), |
| 48 | Self::Cs(_) => spi::ErrorKind::Other, | 51 | Self::Cs(_) => spi::ErrorKind::Other, |
| 52 | Self::DelayUsNotSupported => spi::ErrorKind::Other, | ||
| 49 | } | 53 | } |
| 50 | } | 54 | } |
| 51 | } | 55 | } |
