mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2024-12-23 20:51:31 +11:00
Add defmt feature (as optional dep) and allow i2c::Error to be formatted (#328)
This commit is contained in:
parent
cd692427f6
commit
38692dfcb9
|
@ -30,6 +30,8 @@ critical-section = { version = "0.2.4", features = ["custom-impl"] }
|
||||||
futures = { version = "0.3", default-features = false, optional = true }
|
futures = { version = "0.3", default-features = false, optional = true }
|
||||||
chrono = { version = "0.4", default-features = false, optional = true }
|
chrono = { version = "0.4", default-features = false, optional = true }
|
||||||
|
|
||||||
|
defmt = { version = ">=0.2.0, <0.4", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
cortex-m-rt = "0.7"
|
cortex-m-rt = "0.7"
|
||||||
panic-halt = "0.2.0"
|
panic-halt = "0.2.0"
|
||||||
|
|
|
@ -66,6 +66,7 @@ pub mod peripheral;
|
||||||
/// I2C error
|
/// I2C error
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
/// I2C abort with error
|
/// I2C abort with error
|
||||||
Abort(u32),
|
Abort(u32),
|
||||||
|
|
Loading…
Reference in a new issue