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

Enable sensor by setting the configuration register.

Disable sensor by setting the configuration register. Optionally contains the most recent temperature to give back to callbacks.

Set the active register to sensor voltage.

Read the sensor voltage register.

Set the active register to die temperature, carrying over the sensor voltage reading.

Read the die temperature register, carrying over the sensor voltage reading.

Trait Implementations

impl Clone for ProtocolState
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for ProtocolState
[src]

impl PartialEq for ProtocolState
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.