Struct capsules_extra::ccs811::Ccs811

source ·
pub struct Ccs811<'a> { /* private fields */ }

Implementations§

source§

impl<'a> Ccs811<'a>

source

pub fn new(i2c: &'a dyn I2CDevice, buffer: &'static mut [u8]) -> Self

source

pub fn startup(&self)

Trait Implementations§

source§

impl<'a> AirQualityDriver<'a> for Ccs811<'a>

source§

fn set_client(&self, client: &'a dyn AirQualityClient)

Set the client to be notified when the capsule has data ready.
source§

fn specify_environment( &self, temp: Option<i32>, humidity: Option<u32>, ) -> Result<(), ErrorCode>

Specify the temperature and humidity used in calculating the air quality. Read more
source§

fn read_co2(&self) -> Result<(), ErrorCode>

Read the CO2 or equivalent CO2 (eCO2) from the sensor. This will trigger the AirQualityClient co2_data_available() callback when the data is ready. Read more
source§

fn read_tvoc(&self) -> Result<(), ErrorCode>

Read the Total Organic Compound (TVOC) from the sensor. This will trigger the AirQualityClient tvoc_data_available() callback when the data is ready. Read more
source§

impl<'a> DeferredCallClient for Ccs811<'a>

source§

fn handle_deferred_call(&self)

Software interrupt function that is called when the deferred call is triggered.
source§

fn register(&'static self)

source§

impl<'a> I2CClient for Ccs811<'a>

source§

fn command_complete(&self, buffer: &'static mut [u8], status: Result<(), Error>)

Called when an I2C command completed. The error denotes whether the command completed successfully or if an error occured.

Auto Trait Implementations§

§

impl<'a> !Freeze for Ccs811<'a>

§

impl<'a> !RefUnwindSafe for Ccs811<'a>

§

impl<'a> !Send for Ccs811<'a>

§

impl<'a> !Sync for Ccs811<'a>

§

impl<'a> Unpin for Ccs811<'a>

§

impl<'a> !UnwindSafe for Ccs811<'a>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.