pub struct Ccs811<I2C> { /* private fields */ }
Expand description
Ccs811 device driver.
Implementations§
Source§impl<I2C, E> Ccs811<I2C>
impl<I2C, E> Ccs811<I2C>
Sourcepub fn set_meas_mode(
&mut self,
drive_mode: DriveMode,
interrupt: InterruptDataReady,
threshold: InterruptThreshold,
) -> Result<(), E>
pub fn set_meas_mode( &mut self, drive_mode: DriveMode, interrupt: InterruptDataReady, threshold: InterruptThreshold, ) -> Result<(), E>
Set MEAS_MODE Register
Sourcepub fn reset(&mut self) -> Result<(), E>
pub fn reset(&mut self) -> Result<(), E>
Perform a SwReset, which brings firmware in Boot Mode.
Sourcepub fn set_baseline(&mut self, baseline: [u8; 2]) -> Result<(), E>
pub fn set_baseline(&mut self, baseline: [u8; 2]) -> Result<(), E>
Set a previosuly retrieved baseline
“A previously stored value may be written back to this two byte register and the Algorithms will use the new value in its calculations (until it adjusts it as part of its internal Automatic Baseline Correction). For more information, refer to ams application note AN000370: CCS811 Clean Air Baseline Save and Restore.”
Sourcepub fn get_error_id(&mut self) -> Result<u8, E>
pub fn get_error_id(&mut self) -> Result<u8, E>
Retrieves Error_Id register
Sourcepub fn get_results(&mut self) -> Result<SensorData, E>
pub fn get_results(&mut self) -> Result<SensorData, E>
Get result
Trait Implementations§
Auto Trait Implementations§
impl<I2C> Freeze for Ccs811<I2C>where
I2C: Freeze,
impl<I2C> RefUnwindSafe for Ccs811<I2C>where
I2C: RefUnwindSafe,
impl<I2C> Send for Ccs811<I2C>where
I2C: Send,
impl<I2C> Sync for Ccs811<I2C>where
I2C: Sync,
impl<I2C> Unpin for Ccs811<I2C>where
I2C: Unpin,
impl<I2C> UnwindSafe for Ccs811<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