[][src]Struct embedded_ccs811::Ccs811

pub struct Ccs811<I2C, NWAKE, WAKEDELAY, MODE> { /* fields omitted */ }

CCS811 device driver

Convenience wrapper arount Ccs811Awake which handles waking up the device on each operation.

Methods

impl<I2C, NWAKE, WAKEDELAY> Ccs811<I2C, NWAKE, WAKEDELAY, Boot>[src]

pub fn new(
    i2c: I2C,
    address: SlaveAddr,
    n_wake_pin: NWAKE,
    wake_delay: WAKEDELAY
) -> Self
[src]

Create new instance of the CCS811 device.

See Ccs811Awake for the case where the nWAKE pin is not used.

impl<I2C, CommE, PinE, NWAKE, WAKEDELAY, MODE> Ccs811<I2C, NWAKE, WAKEDELAY, MODE> where
    I2C: Write<Error = CommE>,
    NWAKE: OutputPin<Error = PinE>,
    WAKEDELAY: DelayUs<u8>, 
[src]

pub fn destroy(self) -> (I2C, NWAKE, WAKEDELAY)[src]

Destroy driver instance, return I²C bus, nWAKE pin and wake delay instances.

Trait Implementations

impl<I2C, CommE, PinE, NWAKE, WAKEDELAY> Ccs811AppMode for Ccs811<I2C, NWAKE, WAKEDELAY, App> where
    I2C: Write<Error = CommE> + WriteRead<Error = CommE>,
    NWAKE: OutputPin<Error = PinE>,
    WAKEDELAY: DelayUs<u8>, 
[src]

type Error = Error<CommE, PinE>

Error type

type ModeChangeError = ModeChangeError<Error<CommE, PinE>, Self>

Boot/App mode change error

type BootModeType = Ccs811<I2C, NWAKE, WAKEDELAY, Boot>

Boot mode type

impl<I2C, CommE, PinE, NWAKE, WAKEDELAY> Ccs811BootMode for Ccs811<I2C, NWAKE, WAKEDELAY, Boot> where
    I2C: Write<Error = CommE> + WriteRead<Error = CommE>,
    NWAKE: OutputPin<Error = PinE>,
    WAKEDELAY: DelayUs<u8>, 
[src]

type Error = Error<CommE, PinE>

Error type

type ModeChangeError = ModeChangeError<Self::Error, Self>

Boot/App mode change error

type TargetType = Ccs811<I2C, NWAKE, WAKEDELAY, App>

Application mode type

impl<I2C, CommE, PinE, NWAKE, WAKEDELAY, MODE> Ccs811Device for Ccs811<I2C, NWAKE, WAKEDELAY, MODE> where
    I2C: Write<Error = CommE> + WriteRead<Error = CommE>,
    NWAKE: OutputPin<Error = PinE>,
    WAKEDELAY: DelayUs<u8>, 
[src]

type Error = Error<CommE, PinE>

Error type

impl<I2C: Debug, NWAKE: Debug, WAKEDELAY: Debug, MODE: Debug> Debug for Ccs811<I2C, NWAKE, WAKEDELAY, MODE>[src]

Auto Trait Implementations

impl<I2C, NWAKE, WAKEDELAY, MODE> RefUnwindSafe for Ccs811<I2C, NWAKE, WAKEDELAY, MODE> where
    I2C: RefUnwindSafe,
    MODE: RefUnwindSafe,
    NWAKE: RefUnwindSafe,
    WAKEDELAY: RefUnwindSafe

impl<I2C, NWAKE, WAKEDELAY, MODE> Send for Ccs811<I2C, NWAKE, WAKEDELAY, MODE> where
    I2C: Send,
    MODE: Send,
    NWAKE: Send,
    WAKEDELAY: Send

impl<I2C, NWAKE, WAKEDELAY, MODE> Sync for Ccs811<I2C, NWAKE, WAKEDELAY, MODE> where
    I2C: Sync,
    MODE: Sync,
    NWAKE: Sync,
    WAKEDELAY: Sync

impl<I2C, NWAKE, WAKEDELAY, MODE> Unpin for Ccs811<I2C, NWAKE, WAKEDELAY, MODE> where
    I2C: Unpin,
    MODE: Unpin,
    NWAKE: Unpin,
    WAKEDELAY: Unpin

impl<I2C, NWAKE, WAKEDELAY, MODE> UnwindSafe for Ccs811<I2C, NWAKE, WAKEDELAY, MODE> where
    I2C: UnwindSafe,
    MODE: UnwindSafe,
    NWAKE: UnwindSafe,
    WAKEDELAY: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.