pub struct BME280<I2C> { /* private fields */ }
Expand description
Representation of a BME280
Implementations§
Source§impl<I2C, E> BME280<I2C>
impl<I2C, E> 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: DelayMs<u8>>(&mut self, delay: &mut D) -> Result<(), Error<E>>
pub fn init<D: DelayMs<u8>>(&mut self, delay: &mut D) -> Result<(), Error<E>>
Initializes the BME280
pub fn release(self) -> I2C
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