Struct bme280_multibus::Settings
source · [−]pub struct Settings {
pub config: Config,
pub ctrl_meas: CtrlMeas,
pub ctrl_hum: Oversampling,
}Expand description
BME280 initialization settings.
Fields
config: Configconfig register value.
ctrl_meas: CtrlMeasctrl_meas register value.
ctrl_hum: Oversamplingctrl_hum register value.
Implementations
sourceimpl Settings
impl Settings
sourcepub const fn new() -> Settings
pub const fn new() -> Settings
Create a new settings structure.
Example
use bme280_multibus::{Config, CtrlMeas, Filter, Mode, Oversampling, Settings, Standby};
const SETTINGS: Settings = Settings {
config: Config::reset()
.set_standby_time(Standby::Millis1000)
.set_filter(Filter::X16),
ctrl_meas: CtrlMeas::reset()
.set_osrs_t(Oversampling::X16)
.set_osrs_p(Oversampling::X16)
.set_mode(Mode::Normal),
ctrl_hum: Oversampling::X16,
};Trait Implementations
impl Copy for Settings
impl Eq for Settings
impl StructuralEq for Settings
impl StructuralPartialEq for Settings
Auto Trait Implementations
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnwindSafe for Settings
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more