[][src]Struct bmp280_ehal::BMP280

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

BMP280 driver

Implementations

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

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

Creates new BMP280 driver

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

pub fn pressure(&mut self) -> f64[src]

Reads and returns pressure

pub fn pressure_one_shot(&mut self) -> f64[src]

Reads and returns pressure and resets con

pub fn temp(&mut self) -> f64[src]

Reads and returns temperature

pub fn config(&mut self) -> Config[src]

Returns current config

pub fn set_config(&mut self, new: Config)[src]

Sets configuration

pub fn set_control(&mut self, new: Control)[src]

Sets control

pub fn control(&mut self) -> Control[src]

Returns control

pub fn status(&mut self) -> Status[src]

Returns device status

pub fn id(&mut self) -> u8[src]

Returns device id

pub fn reset(&mut self)[src]

Software reset, emulates POR

Auto Trait Implementations

impl<I2C> Send for BMP280<I2C> where
    I2C: Send
[src]

impl<I2C> Sync for BMP280<I2C> where
    I2C: Sync
[src]

impl<I2C> Unpin for BMP280<I2C> where
    I2C: Unpin
[src]

Blanket Implementations

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

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

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

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

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

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> 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.