pub struct Ccs811Awake<I2C, MODE> { /* private fields */ }
Expand description
Already awake CCS811 device driver
This can be used when the nWAKE pin is connected directly to GND or when
handling the device waking manually instead of using the Ccs811
wrapper type.
Implementations§
Source§impl<I2C> Ccs811Awake<I2C, Boot>
impl<I2C> Ccs811Awake<I2C, Boot>
Trait Implementations§
Source§impl<I2C, E> Ccs811AppMode for Ccs811Awake<I2C, App>where
I2C: I2c<Error = E>,
impl<I2C, E> Ccs811AppMode for Ccs811Awake<I2C, App>where
I2C: I2c<Error = E>,
Source§type Error = ErrorAwake<E>
type Error = ErrorAwake<E>
Error type
Source§type ModeChangeError = ModeChangeError<ErrorAwake<E>, Ccs811Awake<I2C, App>>
type ModeChangeError = ModeChangeError<ErrorAwake<E>, Ccs811Awake<I2C, App>>
Boot/App mode change error
Source§type BootModeType = Ccs811Awake<I2C, Boot>
type BootModeType = Ccs811Awake<I2C, Boot>
Boot mode type
Source§fn set_mode(&mut self, mode: MeasurementMode) -> Result<(), Self::Error>
fn set_mode(&mut self, mode: MeasurementMode) -> Result<(), Self::Error>
Set the measurement mode Read more
Source§fn has_data_ready(&mut self) -> Result<bool, Self::Error>
fn has_data_ready(&mut self) -> Result<bool, Self::Error>
Check if there is a new data sample ready.
Source§fn data(&mut self) -> Result<AlgorithmResult, Self::Error>
fn data(&mut self) -> Result<AlgorithmResult, Self::Error>
Get the algorithm results data. Read more
Source§fn set_environment(
&mut self,
humidity_percentage: f32,
temperature_celsius: f32,
) -> Result<(), Self::Error>
fn set_environment( &mut self, humidity_percentage: f32, temperature_celsius: f32, ) -> Result<(), Self::Error>
Set the environment temperature and relative humidity. Read more
Source§fn set_eco2_thresholds(
&mut self,
low_to_medium: u16,
medium_to_high: u16,
) -> Result<(), Self::Error>
fn set_eco2_thresholds( &mut self, low_to_medium: u16, medium_to_high: u16, ) -> Result<(), Self::Error>
Set the eCO2 threshold values for interrupt generation (in ppm). Read more
Source§fn set_interrupt_mode(&mut self, mode: InterruptMode) -> Result<(), Self::Error>
fn set_interrupt_mode(&mut self, mode: InterruptMode) -> Result<(), Self::Error>
Configure the interrupt generation.
Source§fn software_reset(self) -> Result<Self::BootModeType, Self::ModeChangeError>
fn software_reset(self) -> Result<Self::BootModeType, Self::ModeChangeError>
Restart the device in boot mode. Read more
Source§impl<I2C, E> Ccs811BootMode for Ccs811Awake<I2C, Boot>where
I2C: I2c<Error = E>,
impl<I2C, E> Ccs811BootMode for Ccs811Awake<I2C, Boot>where
I2C: I2c<Error = E>,
Source§type Error = ErrorAwake<E>
type Error = ErrorAwake<E>
Error type
Source§type ModeChangeError = ModeChangeError<<Ccs811Awake<I2C, Boot> as Ccs811BootMode>::Error, Ccs811Awake<I2C, Boot>>
type ModeChangeError = ModeChangeError<<Ccs811Awake<I2C, Boot> as Ccs811BootMode>::Error, Ccs811Awake<I2C, Boot>>
Boot/App mode change error
Source§type TargetType = Ccs811Awake<I2C, App>
type TargetType = Ccs811Awake<I2C, App>
Application mode type
Source§fn start_application(self) -> Result<Self::TargetType, Self::ModeChangeError>
fn start_application(self) -> Result<Self::TargetType, Self::ModeChangeError>
Start application mode Read more
Source§fn download_application<D: DelayNs>(
&mut self,
bin: &[u8],
delay: &mut D,
) -> Result<(), Self::Error>
fn download_application<D: DelayNs>( &mut self, bin: &[u8], delay: &mut D, ) -> Result<(), Self::Error>
Download new application. Read more
Source§impl<I2C, E, MODE> Ccs811Device for Ccs811Awake<I2C, MODE>where
I2C: I2c<Error = E>,
impl<I2C, E, MODE> Ccs811Device for Ccs811Awake<I2C, MODE>where
I2C: I2c<Error = E>,
Source§type Error = ErrorAwake<E>
type Error = ErrorAwake<E>
Error type
Source§fn firmware_mode(&mut self) -> Result<FirmwareMode, Self::Error>
fn firmware_mode(&mut self) -> Result<FirmwareMode, Self::Error>
Get the firmware mode.
Source§fn has_valid_app(&mut self) -> Result<bool, Self::Error>
fn has_valid_app(&mut self) -> Result<bool, Self::Error>
Check if a valid application firmware is loaded.
Source§fn hardware_id(&mut self) -> Result<u8, Self::Error>
fn hardware_id(&mut self) -> Result<u8, Self::Error>
Get the hardware ID (0x81 for the CCS81x family of devices)
Source§fn hardware_version(&mut self) -> Result<(u8, u8), Self::Error>
fn hardware_version(&mut self) -> Result<(u8, u8), Self::Error>
Get the hardware version (major, minor) ((1,X) for the CCS81x family of devices)
Auto Trait Implementations§
impl<I2C, MODE> Freeze for Ccs811Awake<I2C, MODE>where
I2C: Freeze,
impl<I2C, MODE> RefUnwindSafe for Ccs811Awake<I2C, MODE>where
I2C: RefUnwindSafe,
MODE: RefUnwindSafe,
impl<I2C, MODE> Send for Ccs811Awake<I2C, MODE>
impl<I2C, MODE> Sync for Ccs811Awake<I2C, MODE>
impl<I2C, MODE> Unpin for Ccs811Awake<I2C, MODE>
impl<I2C, MODE> UnwindSafe for Ccs811Awake<I2C, MODE>where
I2C: UnwindSafe,
MODE: 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