[][src]Struct bmp388::BMP388

pub struct BMP388<I2C: WriteRead> { /* fields omitted */ }

BMP388 driver

Methods

impl<I2C: WriteRead> BMP388<I2C>[src]

pub fn new<E>(i2c: I2C) -> Result<BMP388<I2C>, E> where
    I2C: WriteRead<Error = E>, 
[src]

Creates new BMP388 driver

impl<I2C: WriteRead> BMP388<I2C>[src]

pub fn sensor_values(&mut self) -> Result<SensorData, I2C::Error>[src]

Reads and returns sensor values

pub fn set_power_control(&mut self, new: PowerControl) -> Result<(), I2C::Error>[src]

Sets power settings

pub fn power_control(&mut self) -> Result<PowerControl, I2C::Error>[src]

Gets power settings

pub fn set_sampling_rate(&mut self, new: SamplingRate) -> Result<(), I2C::Error>[src]

Sets sampling rate

pub fn sampling_rate(&mut self) -> Result<SamplingRate, I2C::Error>[src]

Returns current sampling rate

pub fn filter(&mut self) -> Result<Filter, I2C::Error>[src]

Returns current filter

pub fn set_filter(&mut self, new: Filter) -> Result<(), I2C::Error>[src]

Sets filter

pub fn set_oversampling(
    &mut self,
    new: OversamplingConfig
) -> Result<(), I2C::Error>
[src]

Sets oversampling configuration

pub fn oversampling(&mut self) -> Result<OversamplingConfig, I2C::Error>[src]

Get oversampling configuration

pub fn set_interrupt_config(
    &mut self,
    new: InterruptConfig
) -> Result<(), I2C::Error>
[src]

Sets interrupt configuration

pub fn interrupt_config(&mut self) -> Result<InterruptConfig, I2C::Error>[src]

Returns current interrupt configuration

pub fn status(&mut self) -> Result<Status, I2C::Error>[src]

Get the status register

pub fn error(&mut self) -> Result<Error, I2C::Error>[src]

Get the error register

pub fn id(&mut self) -> Result<u8, I2C::Error>[src]

Returns device id

pub fn reset(&mut self) -> Result<(), I2C::Error>[src]

Software reset, emulates POR

Auto Trait Implementations

impl<I2C> Send for BMP388<I2C> where
    I2C: Send

impl<I2C> Sync for BMP388<I2C> where
    I2C: Sync

impl<I2C> Unpin for BMP388<I2C> where
    I2C: Unpin

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]