[][src]Trait shtcx::LowPower

pub trait LowPower<E> {
    const WAKEUP_TIME_US: u16;

    fn sleep(&mut self) -> Result<(), Error<E>>;
fn start_wakeup(&mut self) -> Result<(), Error<E>>;
fn wakeup(&mut self, delay: &mut impl DelayUs<u16>) -> Result<(), Error<E>>; }

Low power functionality (sleep and wakeup).

This functionality is only present on some of the sensors (e.g. the SHTC3, but not the SHTC1).

Associated Constants

const WAKEUP_TIME_US: u16

Time the sensor needs until it is ready after a wakeup call.

Loading content...

Required methods

fn sleep(&mut self) -> Result<(), Error<E>>

Set sensor to sleep mode.

When in sleep mode, the sensor consumes around 0.3-0.6 µA. It requires a dedicated wakeup command to enable further I2C communication.

fn start_wakeup(&mut self) -> Result<(), Error<E>>

Wake up sensor from sleep mode.

fn wakeup(&mut self, delay: &mut impl DelayUs<u16>) -> Result<(), Error<E>>

Wake up sensor from sleep mode and wait until it is ready.

Loading content...

Implementors

impl<I2C, E> LowPower<E> for ShtCx<Sht2Gen, I2C> where
    I2C: Read<Error = E> + Write<Error = E>, 
[src]

impl<I2C, E> LowPower<E> for ShtCx<ShtGeneric, I2C> where
    I2C: Read<Error = E> + Write<Error = E>, 
[src]

Loading content...