pub struct BME280<I2C> { /* private fields */ }
Expand description
Representation of a BME280
Implementations§
source§impl<I2C> BME280<I2C>
impl<I2C> BME280<I2C>
sourcepub fn new_primary(i2c: I2C) -> Self
pub fn new_primary(i2c: I2C) -> Self
Create a new BME280 struct using the primary I²C address 0x76
sourcepub fn new_secondary(i2c: I2C) -> Self
pub fn new_secondary(i2c: I2C) -> Self
Create a new BME280 struct using the secondary I²C address 0x77
sourcepub fn new(i2c: I2C, address: u8) -> Self
pub fn new(i2c: I2C, address: u8) -> Self
Create a new BME280 struct using a custom I²C address
sourcepub fn init<D: DelayNs>(
&mut self,
delay: &mut D
) -> Result<(), Error<I2C::Error>>
pub fn init<D: DelayNs>( &mut self, delay: &mut D ) -> Result<(), Error<I2C::Error>>
Initializes the BME280. This configures 2x temperature oversampling, 16x pressure oversampling, and the IIR filter coefficient 16.
sourcepub fn init_with_config<D: DelayNs>(
&mut self,
delay: &mut D,
config: Configuration
) -> Result<(), Error<I2C::Error>>
pub fn init_with_config<D: DelayNs>( &mut self, delay: &mut D, config: Configuration ) -> Result<(), Error<I2C::Error>>
Initializes the BME280, applying the given configuration.
Trait Implementations§
Auto Trait Implementations§
impl<I2C> Freeze for BME280<I2C>where
I2C: Freeze,
impl<I2C> RefUnwindSafe for BME280<I2C>where
I2C: RefUnwindSafe,
impl<I2C> Send for BME280<I2C>where
I2C: Send,
impl<I2C> Sync for BME280<I2C>where
I2C: Sync,
impl<I2C> Unpin for BME280<I2C>where
I2C: Unpin,
impl<I2C> UnwindSafe for BME280<I2C>where
I2C: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more