Enum capsules::lps25hb::State
[−]
[src]
enum State { Idle, SelectWhoAmI, ReadingWhoAmI, TakeMeasurementInit, TakeMeasurementClear, TakeMeasurementConfigure, ReadMeasurement, GotMeasurement, Done, }
States of the I2C protocol with the LPS25HB.
Variants
Idle
SelectWhoAmI
Read the WHO_AM_I register. This should return 0xBB.
ReadingWhoAmI
TakeMeasurementInit
Process of taking a pressure measurement. Start with chip powered off
TakeMeasurementClear
Then clear the current reading (just in case it exists) to reset the interrupt line.
TakeMeasurementConfigure
Enable a single shot measurement with interrupt when data is ready.
ReadMeasurement
Read the 3 pressure registers.
GotMeasurement
Calculate pressure and call the callback with the value.
Done
Disable I2C and release buffer
Trait Implementations
impl Clone for State
[src]
fn clone(&self) -> State
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more