![]() |
LibDriver HDC1080
|
hdc1080 base driver modules More...
Data Structures | |
| struct | hdc1080_handle_s |
| hdc1080 handle structure definition More... | |
| struct | hdc1080_info_s |
| hdc1080 information structure definition More... | |
Typedefs | |
| typedef struct hdc1080_handle_s | hdc1080_handle_t |
| hdc1080 handle structure definition | |
| typedef struct hdc1080_info_s | hdc1080_info_t |
| hdc1080 information structure definition | |
Enumerations | |
| enum | hdc1080_bool_t { HDC1080_BOOL_FALSE = 0x00 , HDC1080_BOOL_TRUE = 0x01 } |
| hdc1080 bool enumeration definition More... | |
| enum | hdc1080_mode_t { HDC1080_MODE_OR = 0x00 , HDC1080_MODE_SEQUENCE = 0x01 } |
| hdc1080 mode enumeration definition More... | |
| enum | hdc1080_temperature_resolution_t { HDC1080_TEMPERATURE_RESOLUTION_14_BIT = 0x00 , HDC1080_TEMPERATURE_RESOLUTION_11_BIT = 0x01 } |
| hdc1080 temperature resolution enumeration definition More... | |
| enum | hdc1080_humidity_resolution_t { HDC1080_HUMIDITY_RESOLUTION_14_BIT = 0x00 , HDC1080_HUMIDITY_RESOLUTION_11_BIT = 0x01 , HDC1080_HUMIDITY_RESOLUTION_8_BIT = 0x02 } |
| hdc1080 humidity resolution enumeration definition More... | |
| enum | hdc1080_battery_status_t { HDC1080_BATTERY_STATUS_OVER_2P8_V = 0x00 , HDC1080_BATTERY_STATUS_LESS_2P8_V = 0x01 } |
| hdc1080 battery status enumeration definition More... | |
Functions | |
| uint8_t | hdc1080_info (hdc1080_info_t *info) |
| get chip's information | |
| uint8_t | hdc1080_init (hdc1080_handle_t *handle) |
| initialize the chip | |
| uint8_t | hdc1080_deinit (hdc1080_handle_t *handle) |
| close the chip | |
| uint8_t | hdc1080_read_temperature_humidity (hdc1080_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 | hdc1080_read_temperature (hdc1080_handle_t *handle, uint16_t *temperature_raw, float *temperature_s) |
| read the temperature | |
| uint8_t | hdc1080_read_humidity (hdc1080_handle_t *handle, uint16_t *humidity_raw, float *humidity_s) |
| read the humidity data | |
| uint8_t | hdc1080_software_reset (hdc1080_handle_t *handle) |
| software reset | |
| uint8_t | hdc1080_set_heater (hdc1080_handle_t *handle, hdc1080_bool_t enable) |
| enable or disable heater | |
| uint8_t | hdc1080_get_heater (hdc1080_handle_t *handle, hdc1080_bool_t *enable) |
| get the heater status | |
| uint8_t | hdc1080_set_mode (hdc1080_handle_t *handle, hdc1080_mode_t mode) |
| set the chip mode | |
| uint8_t | hdc1080_get_mode (hdc1080_handle_t *handle, hdc1080_mode_t *mode) |
| get the chip mode | |
| uint8_t | hdc1080_get_battery_status (hdc1080_handle_t *handle, hdc1080_battery_status_t *status) |
| get battery status | |
| uint8_t | hdc1080_set_temperature_resolution (hdc1080_handle_t *handle, hdc1080_temperature_resolution_t resolution) |
| set temperature resolution | |
| uint8_t | hdc1080_get_temperature_resolution (hdc1080_handle_t *handle, hdc1080_temperature_resolution_t *resolution) |
| get temperature resolution | |
| uint8_t | hdc1080_set_humidity_resolution (hdc1080_handle_t *handle, hdc1080_humidity_resolution_t resolution) |
| set humidity resolution | |
| uint8_t | hdc1080_get_humidity_resolution (hdc1080_handle_t *handle, hdc1080_humidity_resolution_t *resolution) |
| get humidity resolution | |
| uint8_t | hdc1080_get_serial_id (hdc1080_handle_t *handle, uint8_t id[6]) |
| get serial id | |
hdc1080 base driver modules
| typedef struct hdc1080_handle_s hdc1080_handle_t |
hdc1080 handle structure definition
| typedef struct hdc1080_info_s hdc1080_info_t |
hdc1080 information structure definition
hdc1080 battery status enumeration definition
| Enumerator | |
|---|---|
| HDC1080_BATTERY_STATUS_OVER_2P8_V | battery voltage > 2.8v |
| HDC1080_BATTERY_STATUS_LESS_2P8_V | battery voltage < 2.8v |
Definition at line 99 of file driver_hdc1080.h.
| enum hdc1080_bool_t |
hdc1080 bool enumeration definition
| Enumerator | |
|---|---|
| HDC1080_BOOL_FALSE | disable |
| HDC1080_BOOL_TRUE | enable |
Definition at line 62 of file driver_hdc1080.h.
hdc1080 humidity resolution enumeration definition
| Enumerator | |
|---|---|
| HDC1080_HUMIDITY_RESOLUTION_14_BIT | 14 bit |
| HDC1080_HUMIDITY_RESOLUTION_11_BIT | 11 bit |
| HDC1080_HUMIDITY_RESOLUTION_8_BIT | 8 bit |
Definition at line 89 of file driver_hdc1080.h.
| enum hdc1080_mode_t |
hdc1080 mode enumeration definition
| Enumerator | |
|---|---|
| HDC1080_MODE_OR | temperature or humidity is acquired |
| HDC1080_MODE_SEQUENCE | temperature and humidity are acquired in sequence, temperature first |
Definition at line 71 of file driver_hdc1080.h.
hdc1080 temperature resolution enumeration definition
| Enumerator | |
|---|---|
| HDC1080_TEMPERATURE_RESOLUTION_14_BIT | 14 bit |
| HDC1080_TEMPERATURE_RESOLUTION_11_BIT | 11 bit |
Definition at line 80 of file driver_hdc1080.h.
| uint8_t hdc1080_deinit | ( | hdc1080_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to an hdc1080 handle structure |
Definition at line 281 of file driver_hdc1080.c.
| uint8_t hdc1080_get_battery_status | ( | hdc1080_handle_t * | handle, |
| hdc1080_battery_status_t * | status ) |
get battery status
| [in] | *handle | pointer to an hdc1080 handle structure |
| [out] | *status | pointer to a battery status buffer |
Definition at line 646 of file driver_hdc1080.c.
| uint8_t hdc1080_get_heater | ( | hdc1080_handle_t * | handle, |
| hdc1080_bool_t * | enable ) |
get the heater status
| [in] | *handle | pointer to an hdc1080 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 527 of file driver_hdc1080.c.
| uint8_t hdc1080_get_humidity_resolution | ( | hdc1080_handle_t * | handle, |
| hdc1080_humidity_resolution_t * | resolution ) |
get humidity resolution
| [in] | *handle | pointer to an hdc1080 handle structure |
| [out] | *resolution | pointer to a humidity resolution buffer |
Definition at line 810 of file driver_hdc1080.c.
| uint8_t hdc1080_get_mode | ( | hdc1080_handle_t * | handle, |
| hdc1080_mode_t * | mode ) |
get the chip mode
| [in] | *handle | pointer to an hdc1080 handle structure |
| [out] | *mode | pointer to a mode buffer |
Definition at line 609 of file driver_hdc1080.c.
| uint8_t hdc1080_get_serial_id | ( | hdc1080_handle_t * | handle, |
| uint8_t | id[6] ) |
get serial id
| [in] | *handle | pointer to an hdc1080 handle structure |
| [out] | *id | pointer to an id buffer |
Definition at line 847 of file driver_hdc1080.c.
| uint8_t hdc1080_get_temperature_resolution | ( | hdc1080_handle_t * | handle, |
| hdc1080_temperature_resolution_t * | resolution ) |
get temperature resolution
| [in] | *handle | pointer to an hdc1080 handle structure |
| [out] | *resolution | pointer to a temperature resolution buffer |
Definition at line 728 of file driver_hdc1080.c.
| uint8_t hdc1080_info | ( | hdc1080_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to an hdc1080 info structure |
Definition at line 966 of file driver_hdc1080.c.
| uint8_t hdc1080_init | ( | hdc1080_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to an hdc1080 handle structure |
Definition at line 159 of file driver_hdc1080.c.
| uint8_t hdc1080_read_humidity | ( | hdc1080_handle_t * | handle, |
| uint16_t * | humidity_raw, | ||
| float * | humidity_s ) |
read the humidity data
| [in] | *handle | pointer to an hdc1080 handle structure |
| [out] | *humidity_raw | pointer to a raw humidity buffer |
| [out] | *humidity_s | pointer to a converted humidity buffer |
Definition at line 401 of file driver_hdc1080.c.
| uint8_t hdc1080_read_temperature | ( | hdc1080_handle_t * | handle, |
| uint16_t * | temperature_raw, | ||
| float * | temperature_s ) |
read the temperature
| [in] | *handle | pointer to an hdc1080 handle structure |
| [out] | *temperature_raw | pointer to a raw temperature buffer |
| [out] | *temperature_s | pointer to a converted temperature buffer |
Definition at line 364 of file driver_hdc1080.c.
| uint8_t hdc1080_read_temperature_humidity | ( | hdc1080_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 hdc1080 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 317 of file driver_hdc1080.c.
| uint8_t hdc1080_set_heater | ( | hdc1080_handle_t * | handle, |
| hdc1080_bool_t | enable ) |
enable or disable heater
| [in] | *handle | pointer to an hdc1080 handle structure |
| [in] | enable | bool value |
Definition at line 482 of file driver_hdc1080.c.
| uint8_t hdc1080_set_humidity_resolution | ( | hdc1080_handle_t * | handle, |
| hdc1080_humidity_resolution_t | resolution ) |
set humidity resolution
| [in] | *handle | pointer to an hdc1080 handle structure |
| [in] | resolution | humidity resolution |
Definition at line 765 of file driver_hdc1080.c.
| uint8_t hdc1080_set_mode | ( | hdc1080_handle_t * | handle, |
| hdc1080_mode_t | mode ) |
set the chip mode
| [in] | *handle | pointer to an hdc1080 handle structure |
| [in] | mode | chip mode |
Definition at line 564 of file driver_hdc1080.c.
| uint8_t hdc1080_set_temperature_resolution | ( | hdc1080_handle_t * | handle, |
| hdc1080_temperature_resolution_t | resolution ) |
set temperature resolution
| [in] | *handle | pointer to an hdc1080 handle structure |
| [in] | resolution | temperature resolution |
Definition at line 683 of file driver_hdc1080.c.
| uint8_t hdc1080_software_reset | ( | hdc1080_handle_t * | handle | ) |
software reset
| [in] | *handle | pointer to an hdc1080 handle structure |
Definition at line 436 of file driver_hdc1080.c.