Trait Ccs811Device

Source
pub trait Ccs811Device: Sealed {
    type Error;

    // Required methods
    fn firmware_mode(&mut self) -> Result<FirmwareMode, Self::Error>;
    fn has_valid_app(&mut self) -> Result<bool, Self::Error>;
    fn hardware_id(&mut self) -> Result<u8, Self::Error>;
    fn hardware_version(&mut self) -> Result<(u8, u8), Self::Error>;
    fn firmware_bootloader_version(
        &mut self,
    ) -> Result<(u8, u8, u8), Self::Error>;
    fn firmware_application_version(
        &mut self,
    ) -> Result<(u8, u8, u8), Self::Error>;
}
Expand description

General CCS811 methods available in either mode

Required Associated Types§

Source

type Error

Error type

Required Methods§

Source

fn firmware_mode(&mut self) -> Result<FirmwareMode, Self::Error>

Get the firmware mode.

Source

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>

Get the hardware ID (0x81 for the CCS81x family of devices)

Source

fn hardware_version(&mut self) -> Result<(u8, u8), Self::Error>

Get the hardware version (major, minor) ((1,X) for the CCS81x family of devices)

Source

fn firmware_bootloader_version(&mut self) -> Result<(u8, u8, u8), Self::Error>

Get the firmware bootloader verion (major, minor, trivial)

Source

fn firmware_application_version(&mut self) -> Result<(u8, u8, u8), Self::Error>

Get the firmware application verion (major, minor, trivial)

Implementors§

Source§

impl<I2C, CommE, PinE, NWAKE, WAKEDELAY, MODE> Ccs811Device for Ccs811<I2C, NWAKE, WAKEDELAY, MODE>
where I2C: I2c<Error = CommE>, NWAKE: OutputPin<Error = PinE>, WAKEDELAY: DelayNs,

Source§

type Error = Error<CommE, PinE>

Source§

impl<I2C, E, MODE> Ccs811Device for Ccs811Awake<I2C, MODE>
where I2C: I2c<Error = E>,