diff --git a/Cargo.toml b/Cargo.toml index 2172a65..709ec83 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,10 +16,13 @@ rust-version = "1.62" [features] default = [] -nightly = ["embedded-hal-async"] +nightly = ["dep:embedded-hal-async"] +defmt-03 = ["dep:defmt"] [dependencies] embedded-hal = "0.2" embedded-hal-async = { version = "1.0.0-rc.3", optional = true } +defmt = { version = "0.3", optional = true } + num-traits = { version = "0.2", default-features = false, features = ["libm"] } \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index 817ba6d..3942455 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -529,6 +529,7 @@ pub enum OutputMode { } #[derive(Debug, Copy, Clone)] +#[cfg_attr(feature = "defmt-03", derive(defmt::Format))] ///Sensor data pub struct SensorData { ///The measured pressure