theCore C++ embedded framework
|
Data Structures | |
class | ecl::sensor::htu21d< i2c_dev > |
HTU21D sensor driver implementation. More... | |
Enumerations | |
enum | ecl::sensor::htu21d_resolution { ecl::sensor::htu21d_resolution::rm12_t14, ecl::sensor::htu21d_resolution::rm8_t12, ecl::sensor::htu21d_resolution::rm10_t13, ecl::sensor::htu21d_resolution::rm11_t11 } |
Defines resolution modes for HTU21D sensor. More... | |
Functions | |
static err | ecl::sensor::htu21d< i2c_dev >::init () |
Inits sensor and underlying I2C platform bus. More... | |
static err | ecl::sensor::htu21d< i2c_dev >::soft_reset () |
Performs soft reset of the sensor. More... | |
static err | ecl::sensor::htu21d< i2c_dev >::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... | |
static err | ecl::sensor::htu21d< i2c_dev >::get_sample_temperature (uint16_t &sample) |
Reads raw temperature sample from sensor. More... | |
static err | ecl::sensor::htu21d< i2c_dev >::get_sample_humidity (uint16_t &sample) |
Reads raw relative humidity sample from sensor. More... | |
static err | ecl::sensor::htu21d< i2c_dev >::get_temperature (int &temperature) |
Reads sample from sensor and converts to a physical value. More... | |
static err | ecl::sensor::htu21d< i2c_dev >::get_humidity (int &humidity) |
Reads sample from sensor and converts to a physical value. More... | |
static err | ecl::sensor::htu21d< i2c_dev >::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 | ecl::sensor::htu21d< i2c_dev >::get_resolution_mode (htu21d_resolution &mode) |
Returns current resolution mode. More... | |
static bool | ecl::sensor::htu21d< i2c_dev >::is_battery_low () |
Checks end of battery status (see RM for details) More... | |
static bool | ecl::sensor::htu21d< i2c_dev >::is_heater_enabled () |
Checks if on-chip heater is enabled. More... | |
static err | ecl::sensor::htu21d< i2c_dev >::enable_heater () |
Enables on-chip heater (see RM for details) More... | |
static err | ecl::sensor::htu21d< i2c_dev >::disable_heater () |
Disables on-chip heater (see RM for details) More... | |
|
strong |
Defines resolution modes for HTU21D sensor.
Possible modes are (RM here - relative humidity): rm12_t14 - 12 bits for RM, 14 bits for temperature rm8_t12 - 8 bits for RM, 12 bits for temperature rm10_t13 - 10 bits for RM, 13 bits for temperature rm11_t11 - 11 bits for RM, 11 bits for temperature
Enumerator | |
---|---|
rm12_t14 | |
rm8_t12 | |
rm10_t13 | |
rm11_t11 |
|
static |
Inits sensor and underlying I2C platform bus.
Status | of operation. |
|
static |
Performs soft reset of the sensor.
Status | of the operation. |
|
static |
Try set buffer for rx/tx and do_xfer several times if error occurred.
Status | of the operation |
|
static |
Reads raw temperature sample from sensor.
Sample should be processed to receive physical value.
[out] | sample | Variable in which raw temp. sample will be written. |
Status | of the operation. |
|
static |
Reads raw relative humidity sample from sensor.
Sample should be processed to receive physical value.
[out] | sample | Variable in which raw RM sample will be written. |
Status | of the operation. |
|
static |
Reads sample from sensor and converts to a physical value.
[out] | temperature | Temperature in (1000 * (temperature in C degree)) will be written in this parameter. |
Status | of the operation. |
|
static |
Reads sample from sensor and converts to a physical value.
[out] | humidity | Relative humidity in (1000 * (humidity in %)) will be written in this parameter. |
Status | of the operation. |
|
static |
Sets resolution mode for measuring Default mode (htu21d_resolution::rm12_t14) is entered after power on.
[in] | mode | Can be value of type htu21d_resolution |
Status | of the operation. |
|
static |
Returns current resolution mode.
[out] | mode | The value in which result will be written. Can be value of type htu21d_resolution |
Status | of the operation. |
|
static |
Checks end of battery status (see RM for details)
True | if battery power > 2.5V, False otherwise. |
|
static |
Checks if on-chip heater is enabled.
True | if enabled, False otherwise. |
|
static |
Enables on-chip heater (see RM for details)
The heater is intended to be used for functionality diagnosis: relative humidity drops upon rising temperature. The heater consumes about 5.5mW and provides a temperature increase of about 0.5-1.5°C
Status | of the operation. |
|
static |
Disables on-chip heater (see RM for details)
Status | of the operation. |