Skip to content

Commit

Permalink
Merge branch 'master' into feat/config-typed-builder
Browse files Browse the repository at this point in the history
  • Loading branch information
elpiel committed Dec 27, 2023
2 parents 68b2adc + 4497a11 commit a1b9ef8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@ rust-version = "1.65"
[features]
default = []

defmt-03 = ["dep:defmt"]

nightly = ["dep:embedded-hal-async"]
config-builder = ["dep:typed-builder"]

[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"] }

typed-builder = { version = "0.18", optional = true }
10 changes: 6 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ impl<I2C: ehal::blocking::i2c::WriteRead> BMP388<I2C, Blocking> {
}
}

///Error
/// Error
pub struct Error {
///Fatal error
pub fatal: bool,
Expand All @@ -434,7 +434,7 @@ pub struct Error {
pub config: bool,
}

///Status
/// Status
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub struct Status {
///Indicates whether chip is ready for a command
Expand All @@ -456,8 +456,9 @@ impl Status {
}
}

#[derive(Debug, Copy, Clone)]
/// Sensor data
#[derive(Debug, Copy, Clone)]
#[cfg_attr(feature = "defmt-03", derive(defmt::Format))]
pub struct SensorData {
///The measured pressure: Pascals (Pa)
pub pressure: f64,
Expand Down Expand Up @@ -527,7 +528,8 @@ impl Default for PowerControl {
}
}
}
///Output mode for interrupt pin

/// Output mode for interrupt pin
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub enum OutputMode {
///Push-pull output mode
Expand Down

0 comments on commit a1b9ef8

Please sign in to comment.