pub struct Configuration {
pub power_control: PowerControl,
pub oversampling: Osr,
pub output_data_rate: Odr,
pub iir_filter: Config,
}Expand description
Configuration for the BMP390 barometer.
Fields§
§power_control: PowerControlEnabling and disabling the pressure and temperature measurements and the power mode.
oversampling: OsrThe oversampling settings for pressure and temperature measurements.
output_data_rate: OdrThe output data rate settings.
iir_filter: ConfigIIR filter coefficient settings.
Implementations§
Source§impl Configuration
impl Configuration
Sourcepub fn to_write_bytes(&self) -> [u8; 8]
pub fn to_write_bytes(&self) -> [u8; 8]
Convert the configuration to a byte array that can be written to the BMP390’s registers. The byte array contains both the register address and the register value.
Trait Implementations§
Source§impl Clone for Configuration
impl Clone for Configuration
Source§fn clone(&self) -> Configuration
fn clone(&self) -> Configuration
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Configuration
impl Debug for Configuration
Source§impl Default for Configuration
impl Default for Configuration
Source§fn default() -> Self
fn default() -> Self
Default configuration for the BMP390 barometer. This configuration enables pressure and temperature measurement with normal power mode, x8 oversampling for pressure and x1 oversampling for temperature, an output data rate of 50 Hz, and a IIR filter coefficient of 4. This corresponds to a “standard resolution” configuration as recommended by the datasheet Section 3.5. Filter selection.