diff options
| author | Matous Hybl <[email protected]> | 2022-07-19 21:15:47 +0200 |
|---|---|---|
| committer | Matous Hybl <[email protected]> | 2022-07-24 22:10:50 +0200 |
| commit | c38755c5b737edbc88753c154feff93a5ced2a38 (patch) | |
| tree | e31d6ee5ac96e7e71e40c27954e13f4209909372 /embassy-embedded-hal/src/shared_bus/mod.rs | |
| parent | 26fdfdb00a1819f4a21c8d0fe1220c079983eecc (diff) | |
Add defmt support to embassy-embedded-hal errors
Diffstat (limited to 'embassy-embedded-hal/src/shared_bus/mod.rs')
| -rw-r--r-- | embassy-embedded-hal/src/shared_bus/mod.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/embassy-embedded-hal/src/shared_bus/mod.rs b/embassy-embedded-hal/src/shared_bus/mod.rs index 76ee413d9..617d921e9 100644 --- a/embassy-embedded-hal/src/shared_bus/mod.rs +++ b/embassy-embedded-hal/src/shared_bus/mod.rs | |||
| @@ -10,6 +10,7 @@ pub mod blocking; | |||
| 10 | 10 | ||
| 11 | /// Error returned by I2C device implementations in this crate. | 11 | /// Error returned by I2C device implementations in this crate. |
| 12 | #[derive(Copy, Clone, Eq, PartialEq, Debug)] | 12 | #[derive(Copy, Clone, Eq, PartialEq, Debug)] |
| 13 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | ||
| 13 | pub enum I2cDeviceError<BUS> { | 14 | pub enum I2cDeviceError<BUS> { |
| 14 | /// An operation on the inner I2C bus failed. | 15 | /// An operation on the inner I2C bus failed. |
| 15 | I2c(BUS), | 16 | I2c(BUS), |
| @@ -28,6 +29,7 @@ where | |||
| 28 | 29 | ||
| 29 | /// Error returned by SPI device implementations in this crate. | 30 | /// Error returned by SPI device implementations in this crate. |
| 30 | #[derive(Copy, Clone, Eq, PartialEq, Debug)] | 31 | #[derive(Copy, Clone, Eq, PartialEq, Debug)] |
| 32 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | ||
| 31 | pub enum SpiDeviceError<BUS, CS> { | 33 | pub enum SpiDeviceError<BUS, CS> { |
| 32 | /// An operation on the inner SPI bus failed. | 34 | /// An operation on the inner SPI bus failed. |
| 33 | Spi(BUS), | 35 | Spi(BUS), |
