Skip to content

Commit

Permalink
bus: impl defmt::Format for DeviceError.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirbaio committed Apr 21, 2023
1 parent 3a7c3ca commit ddd6c42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions embedded-hal-bus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ std = []
[dependencies]
embedded-hal = { version = "=1.0.0-alpha.10", path = "../embedded-hal" }
critical-section = { version = "1.0" }
defmt = { version = "0.3", optional = true }
1 change: 1 addition & 0 deletions embedded-hal-bus/src/spi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pub use self::critical_section::*;

/// Error type for [`ExclusiveDevice`] operations.
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum DeviceError<BUS, CS> {
/// An inner SPI bus operation failed
Spi(BUS),
Expand Down

0 comments on commit ddd6c42

Please sign in to comment.