pub struct Hdc1080<I2C> { /* private fields */ }
Expand description
Hdc1080 device driver.
Implementations§
source§impl<I2C> Hdc1080<I2C>where
I2C: I2CDevice,
impl<I2C> Hdc1080<I2C>where
I2C: I2CDevice,
sourcepub fn read_temperature_finish(&mut self) -> Result<f32, I2C::Error>
pub fn read_temperature_finish(&mut self) -> Result<f32, I2C::Error>
Read the temperature from the sensor (celsius).
sourcepub fn read_humidity_finish(&mut self) -> Result<f32, I2C::Error>
pub fn read_humidity_finish(&mut self) -> Result<f32, I2C::Error>
Read humidity from the sensor (RH%).
sourcepub fn read_temperature_humidity_finish(
&mut self
) -> Result<(f32, f32), I2C::Error>
pub fn read_temperature_humidity_finish(
&mut self
) -> Result<(f32, f32), I2C::Error>
Read the temperature from the sensor (celsius).
sourcepub fn read_temperature_start(&mut self) -> Result<(), I2C::Error>
pub fn read_temperature_start(&mut self) -> Result<(), I2C::Error>
Read the temperature from the sensor (celsius).
sourcepub fn read_humidity_start(&mut self) -> Result<(), I2C::Error>
pub fn read_humidity_start(&mut self) -> Result<(), I2C::Error>
Read the humidity from the sensor (RH).
sourcepub fn write_config(&mut self, config: Config) -> Result<(), I2C::Error>
pub fn write_config(&mut self, config: Config) -> Result<(), I2C::Error>
Write config register, 0x02
sourcepub fn read_config(&mut self) -> Result<u16, I2C::Error>
pub fn read_config(&mut self) -> Result<u16, I2C::Error>
Read config, register 0x02
sourcepub fn battery_low(&mut self) -> Result<bool, I2C::Error>
pub fn battery_low(&mut self) -> Result<bool, I2C::Error>
Returns true if battery voltage is under 2.8v
sourcepub fn read_manufacturer(&mut self) -> Result<u16, I2C::Error>
pub fn read_manufacturer(&mut self) -> Result<u16, I2C::Error>
Read manufacturer, register 0xfe
sourcepub fn read_device_id(&mut self) -> Result<u16, I2C::Error>
pub fn read_device_id(&mut self) -> Result<u16, I2C::Error>
Read device id, register 0xff
sourcepub fn read_serial(&mut self) -> Result<u64, I2C::Error>
pub fn read_serial(&mut self) -> Result<u64, I2C::Error>
Read serial registers 0xfb, 0xfc, 0xfd.