Enum capsules::tmp006::ProtocolState
[−]
[src]
enum ProtocolState { Idle, Configure, Deconfigure(Option<f32>), SetRegSensorVoltage, ReadingSensorVoltage, SetRegDieTemperature(i16), ReadingDieTemperature(i16), }
States of the I2C protocol with the TMP006. There are three sequences:
Enable sensor
Configure -> ()
Disable sensor
Disconfigure -> ()
Read temperature
SetRegSensorVoltage --> ReadingSensorVoltage --(voltage)-> SetRegDieTemperature(voltage) --(voltage)-> ReadingDieTemperature --(unless repeated_mode)-> Disconfigure
Variants
Idle
Configure
Enable sensor by setting the configuration register.
Deconfigure(Option<f32>)
Disable sensor by setting the configuration register. Optionally contains the most recent temperature to give back to callbacks.
SetRegSensorVoltage
Set the active register to sensor voltage.
ReadingSensorVoltage
Read the sensor voltage register.
SetRegDieTemperature(i16)
Set the active register to die temperature, carrying over the sensor voltage reading.
ReadingDieTemperature(i16)
Read the die temperature register, carrying over the sensor voltage reading.
Trait Implementations
impl Clone for ProtocolState
[src]
fn clone(&self) -> ProtocolState
[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
impl Copy for ProtocolState
[src]
impl PartialEq for ProtocolState
[src]
fn eq(&self, __arg_0: &ProtocolState) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ProtocolState) -> bool
[src]
This method tests for !=
.