Add defmt support to embassy-embedded-hal errors

This commit is contained in:
Matous Hybl
2022-07-19 21:15:47 +02:00
parent 26fdfdb00a
commit c38755c5b7
4 changed files with 7 additions and 3 deletions

View File

@ -10,6 +10,7 @@ pub mod blocking;
/// Error returned by I2C device implementations in this crate.
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum I2cDeviceError<BUS> {
/// An operation on the inner I2C bus failed.
I2c(BUS),
@ -28,6 +29,7 @@ where
/// Error returned by SPI device implementations in this crate.
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum SpiDeviceError<BUS, CS> {
/// An operation on the inner SPI bus failed.
Spi(BUS),