![]() |
LibDriver HTU21D
|
htu21d base driver modules More...
Data Structures | |
| struct | htu21d_handle_s |
| htu21d handle structure definition More... | |
| struct | htu21d_info_s |
| htu21d information structure definition More... | |
Typedefs | |
| typedef struct htu21d_handle_s | htu21d_handle_t |
| htu21d handle structure definition | |
| typedef struct htu21d_info_s | htu21d_info_t |
| htu21d information structure definition | |
Enumerations | |
| enum | htu21d_bool_t { HTU21D_BOOL_FALSE = 0x00 , HTU21D_BOOL_TRUE = 0x01 } |
| htu21d bool enumeration definition More... | |
| enum | htu21d_mode_t { HTU21D_MODE_HOLD_MASTER = 0x00 , HTU21D_MODE_NO_HOLD_MASTER = 0x01 } |
| htu21d mode enumeration definition More... | |
| enum | htu21d_status_t { HTU21D_STATUS_OVER_2P25 = 0x00 , HTU21D_STATUS_LESS_2P25 = 0x01 } |
| htu21d status enumeration definition More... | |
| enum | htu21d_resolution_t { HTU21D_RESOLUTION_TEMP_11_BITS_RH_11_BITS = 0x03 , HTU21D_RESOLUTION_TEMP_12_BITS_RH_8_BITS = 0x01 , HTU21D_RESOLUTION_TEMP_13_BITS_RH_10_BITS = 0x02 , HTU21D_RESOLUTION_TEMP_14_BITS_RH_12_BITS = 0x00 } |
| htu21d resolution enumeration definition More... | |
Functions | |
| uint8_t | htu21d_info (htu21d_info_t *info) |
| get chip's information | |
| uint8_t | htu21d_init (htu21d_handle_t *handle) |
| initialize the chip | |
| uint8_t | htu21d_deinit (htu21d_handle_t *handle) |
| close the chip | |
| uint8_t | htu21d_set_mode (htu21d_handle_t *handle, htu21d_mode_t mode) |
| set the chip mode | |
| uint8_t | htu21d_get_mode (htu21d_handle_t *handle, htu21d_mode_t *mode) |
| get the chip mode | |
| uint8_t | htu21d_soft_reset (htu21d_handle_t *handle) |
| soft reset | |
| uint8_t | htu21d_read_temperature_humidity (htu21d_handle_t *handle, uint16_t *temperature_raw, float *temperature_s, uint16_t *humidity_raw, float *humidity_s) |
| read the temperature and humidity data | |
| uint8_t | htu21d_read_temperature (htu21d_handle_t *handle, uint16_t *temperature_raw, float *temperature_s) |
| read the temperature data | |
| uint8_t | htu21d_read_humidity (htu21d_handle_t *handle, uint16_t *humidity_raw, float *humidity_s) |
| read the humidity data | |
| uint8_t | htu21d_set_resolution (htu21d_handle_t *handle, htu21d_resolution_t resolution) |
| set the resolution | |
| uint8_t | htu21d_get_resolution (htu21d_handle_t *handle, htu21d_resolution_t *resolution) |
| get the resolution | |
| uint8_t | htu21d_get_battery_status (htu21d_handle_t *handle, htu21d_status_t *status) |
| get the battery status | |
| uint8_t | htu21d_set_heater (htu21d_handle_t *handle, htu21d_bool_t enable) |
| enable or disable the heater | |
| uint8_t | htu21d_get_heater (htu21d_handle_t *handle, htu21d_bool_t *enable) |
| get the heater status | |
| uint8_t | htu21d_set_disable_otp_reload (htu21d_handle_t *handle, htu21d_bool_t enable) |
| enable or disable otp reload | |
| uint8_t | htu21d_get_disable_otp_reload (htu21d_handle_t *handle, htu21d_bool_t *enable) |
| get the disable otp reload status | |
| uint8_t | htu21d_get_serial_number (htu21d_handle_t *handle, uint64_t *number) |
| get the serial number | |
htu21d base driver modules
| typedef struct htu21d_handle_s htu21d_handle_t |
htu21d handle structure definition
| typedef struct htu21d_info_s htu21d_info_t |
htu21d information structure definition
| enum htu21d_bool_t |
htu21d bool enumeration definition
| Enumerator | |
|---|---|
| HTU21D_BOOL_FALSE | false |
| HTU21D_BOOL_TRUE | true |
Definition at line 62 of file driver_htu21d.h.
| enum htu21d_mode_t |
htu21d mode enumeration definition
| Enumerator | |
|---|---|
| HTU21D_MODE_HOLD_MASTER | hold master mode |
| HTU21D_MODE_NO_HOLD_MASTER | no hold master mode |
Definition at line 71 of file driver_htu21d.h.
| enum htu21d_resolution_t |
htu21d resolution enumeration definition
Definition at line 89 of file driver_htu21d.h.
| enum htu21d_status_t |
htu21d status enumeration definition
| Enumerator | |
|---|---|
| HTU21D_STATUS_OVER_2P25 | >2.25V |
| HTU21D_STATUS_LESS_2P25 | <2.25V |
Definition at line 80 of file driver_htu21d.h.
| uint8_t htu21d_deinit | ( | htu21d_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to an htu21d handle structure |
Definition at line 1213 of file driver_htu21d.c.
| uint8_t htu21d_get_battery_status | ( | htu21d_handle_t * | handle, |
| htu21d_status_t * | status ) |
get the battery status
| [in] | *handle | pointer to an htu21d handle structure |
| [out] | *status | pointer to a status buffer |
Definition at line 812 of file driver_htu21d.c.
| uint8_t htu21d_get_disable_otp_reload | ( | htu21d_handle_t * | handle, |
| htu21d_bool_t * | enable ) |
get the disable otp reload status
| [in] | *handle | pointer to an htu21d handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 980 of file driver_htu21d.c.
| uint8_t htu21d_get_heater | ( | htu21d_handle_t * | handle, |
| htu21d_bool_t * | enable ) |
get the heater status
| [in] | *handle | pointer to an htu21d handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 896 of file driver_htu21d.c.
| uint8_t htu21d_get_mode | ( | htu21d_handle_t * | handle, |
| htu21d_mode_t * | mode ) |
get the chip mode
| [in] | *handle | pointer to an htu21d handle structure |
| [out] | *mode | pointer to a chip mode buffer |
Definition at line 246 of file driver_htu21d.c.
| uint8_t htu21d_get_resolution | ( | htu21d_handle_t * | handle, |
| htu21d_resolution_t * | resolution ) |
get the resolution
| [in] | *handle | pointer to an htu21d handle structure |
| [out] | *resolution | pointer to a resolution buffer |
Definition at line 772 of file driver_htu21d.c.
| uint8_t htu21d_get_serial_number | ( | htu21d_handle_t * | handle, |
| uint64_t * | number ) |
get the serial number
| [in] | *handle | pointer to an htu21d handle structure |
| [out] | *number | pointer to a number buffer |
Definition at line 1019 of file driver_htu21d.c.
| uint8_t htu21d_info | ( | htu21d_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to an htu21d info structure |
Definition at line 1305 of file driver_htu21d.c.
| uint8_t htu21d_init | ( | htu21d_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to an htu21d handle structure |
Definition at line 1107 of file driver_htu21d.c.
| uint8_t htu21d_read_humidity | ( | htu21d_handle_t * | handle, |
| uint16_t * | humidity_raw, | ||
| float * | humidity_s ) |
read the humidity data
| [in] | *handle | pointer to an htu21d handle structure |
| [out] | *humidity_raw | pointer to a raw humidity buffer |
| [out] | *humidity_s | pointer to a converted humidity buffer |
Definition at line 614 of file driver_htu21d.c.
| uint8_t htu21d_read_temperature | ( | htu21d_handle_t * | handle, |
| uint16_t * | temperature_raw, | ||
| float * | temperature_s ) |
read the temperature data
| [in] | *handle | pointer to an htu21d handle structure |
| [out] | *temperature_raw | pointer to a raw temperature buffer |
| [out] | *temperature_s | pointer to a converted temperature buffer |
Definition at line 501 of file driver_htu21d.c.
| uint8_t htu21d_read_temperature_humidity | ( | htu21d_handle_t * | handle, |
| uint16_t * | temperature_raw, | ||
| float * | temperature_s, | ||
| uint16_t * | humidity_raw, | ||
| float * | humidity_s ) |
read the temperature and humidity data
| [in] | *handle | pointer to an htu21d handle structure |
| [out] | *temperature_raw | pointer to a raw temperature buffer |
| [out] | *temperature_s | pointer to a converted temperature buffer |
| [out] | *humidity_raw | pointer to a raw humidity buffer |
| [out] | *humidity_s | pointer to a converted humidity buffer |
Definition at line 313 of file driver_htu21d.c.
| uint8_t htu21d_set_disable_otp_reload | ( | htu21d_handle_t * | handle, |
| htu21d_bool_t | enable ) |
enable or disable otp reload
| [in] | *handle | pointer to an htu21d handle structure |
| [in] | enable | bool value |
Definition at line 934 of file driver_htu21d.c.
| uint8_t htu21d_set_heater | ( | htu21d_handle_t * | handle, |
| htu21d_bool_t | enable ) |
enable or disable the heater
| [in] | *handle | pointer to an htu21d handle structure |
| [in] | enable | bool value |
Definition at line 850 of file driver_htu21d.c.
| uint8_t htu21d_set_mode | ( | htu21d_handle_t * | handle, |
| htu21d_mode_t | mode ) |
set the chip mode
| [in] | *handle | pointer to an htu21d handle structure |
| [in] | mode | chip mode |
Definition at line 219 of file driver_htu21d.c.
| uint8_t htu21d_set_resolution | ( | htu21d_handle_t * | handle, |
| htu21d_resolution_t | resolution ) |
set the resolution
| [in] | *handle | pointer to an htu21d handle structure |
| [in] | resolution | chip resolution |
Definition at line 724 of file driver_htu21d.c.
| uint8_t htu21d_soft_reset | ( | htu21d_handle_t * | handle | ) |
soft reset
| [in] | *handle | pointer to an htu21d handle structure |
Definition at line 272 of file driver_htu21d.c.