pub trait LowPower<E: Error> {
const WAKEUP_TIME_US: u32;
// Required methods
fn sleep(&mut self) -> Result<(), Error<E>>;
fn start_wakeup(&mut self) -> Result<(), Error<E>>;
fn wakeup(&mut self, delay: &mut impl DelayNs) -> Result<(), Error<E>>;
}
Expand description
Low power functionality (sleep and wakeup).
This functionality is only present on some of the sensors (e.g. the SHTC3, but not the SHTC1).
Required Associated Constants§
sourceconst WAKEUP_TIME_US: u32
const WAKEUP_TIME_US: u32
Time the sensor needs until it is ready after a wakeup call.
Required Methods§
sourcefn sleep(&mut self) -> Result<(), Error<E>>
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.
sourcefn start_wakeup(&mut self) -> Result<(), Error<E>>
fn start_wakeup(&mut self) -> Result<(), Error<E>>
Wake up sensor from sleep mode.
Object Safety§
This trait is not object safe.