theCore C++ embedded framework
ecl::sensor::htu21d< i2c_dev > Class Template Reference

HTU21D sensor driver implementation. More...

#include </home/travis/build/forGGe/theCore/dev/sensor/htu21d/export/dev/sensor/htu21d.hpp>

Public Member Functions

 htu21d ()=delete
 
 ~htu21d ()=delete
 

Static Public Member Functions

static err init ()
 Inits sensor and underlying I2C platform bus. More...
 
static err soft_reset ()
 Performs soft reset of the sensor. More...
 
static err get_sample_temperature (uint16_t &sample)
 Reads raw temperature sample from sensor. More...
 
static err get_sample_humidity (uint16_t &sample)
 Reads raw relative humidity sample from sensor. More...
 
static err get_temperature (int &temperature)
 Reads sample from sensor and converts to a physical value. More...
 
static err get_humidity (int &humidity)
 Reads sample from sensor and converts to a physical value. More...
 
static bool is_battery_low ()
 Checks end of battery status (see RM for details) More...
 
static bool is_heater_enabled ()
 Checks if on-chip heater is enabled. More...
 
static err enable_heater ()
 Enables on-chip heater (see RM for details) More...
 
static err disable_heater ()
 Disables on-chip heater (see RM for details) More...
 
static err set_resolution_mode (htu21d_resolution mode)
 Sets resolution mode for measuring Default mode (htu21d_resolution::rm12_t14) is entered after power on. More...
 
static err get_resolution_mode (htu21d_resolution &mode)
 Returns current resolution mode. More...
 
static err try_xfer (uint8_t cmd, uint8_t *data, size_t data_size)
 Try set buffer for rx/tx and do_xfer several times if error occurred. More...
 

Detailed Description

template<class i2c_dev>
class ecl::sensor::htu21d< i2c_dev >

HTU21D sensor driver implementation.

Template Parameters
I2Cgeneric bus driver

Constructor & Destructor Documentation

◆ htu21d()

template<class i2c_dev >
ecl::sensor::htu21d< i2c_dev >::htu21d ( )
delete

◆ ~htu21d()

template<class i2c_dev >
ecl::sensor::htu21d< i2c_dev >::~htu21d ( )
delete

The documentation for this class was generated from the following file: