![]() |
LibDriver HDC302X
|
hdc302x base driver modules More...
Data Structures | |
| struct | hdc302x_handle_s |
| hdc302x handle structure definition More... | |
| struct | hdc302x_info_s |
| hdc302x information structure definition More... | |
Typedefs | |
| typedef struct hdc302x_handle_s | hdc302x_handle_t |
| hdc302x handle structure definition | |
| typedef struct hdc302x_info_s | hdc302x_info_t |
| hdc302x information structure definition | |
Functions | |
| uint8_t | hdc302x_info (hdc302x_info_t *info) |
| get chip's information | |
| uint8_t | hdc302x_set_addr (hdc302x_handle_t *handle, hdc302x_address_t addr) |
| set the iic address | |
| uint8_t | hdc302x_get_addr (hdc302x_handle_t *handle, hdc302x_address_t *addr) |
| get the iic address | |
| uint8_t | hdc302x_irq_handler (hdc302x_handle_t *handle) |
| irq handler | |
| uint8_t | hdc302x_init (hdc302x_handle_t *handle) |
| initialize the chip | |
| uint8_t | hdc302x_deinit (hdc302x_handle_t *handle) |
| close the chip | |
| uint8_t | hdc302x_set_low_power_mode (hdc302x_handle_t *handle, hdc302x_low_power_mode_t mode) |
| set low power mode | |
| uint8_t | hdc302x_get_low_power_mode (hdc302x_handle_t *handle, hdc302x_low_power_mode_t *mode) |
| get low power mode | |
| uint8_t | hdc302x_set_auto_mode (hdc302x_handle_t *handle, hdc302x_auto_mode_t mode) |
| set auto mode | |
| uint8_t | hdc302x_get_auto_mode (hdc302x_handle_t *handle, hdc302x_auto_mode_t *mode) |
| get auto mode | |
| uint8_t | hdc302x_soft_reset (hdc302x_handle_t *handle) |
| soft reset | |
| uint8_t | hdc302x_single_read (hdc302x_handle_t *handle, uint16_t *temperature_raw, float *temperature_s, uint16_t *humidity_raw, float *humidity_s) |
| single read | |
| uint8_t | hdc302x_start_continuous_read (hdc302x_handle_t *handle) |
| start continuous read | |
| uint8_t | hdc302x_stop_continuous_read (hdc302x_handle_t *handle) |
| stop continuous read | |
| uint8_t | hdc302x_continuous_read (hdc302x_handle_t *handle, uint16_t *temperature_raw, float *temperature_s, uint16_t *humidity_raw, float *humidity_s) |
| continuous read | |
| uint8_t | hdc302x_continuous_read_humidity (hdc302x_handle_t *handle, uint16_t *humidity_raw, float *humidity_s) |
| continuous read humidity | |
| uint8_t | hdc302x_read_temperature_min (hdc302x_handle_t *handle, uint16_t *temperature_raw, float *temperature_s) |
| read temperature min | |
| uint8_t | hdc302x_read_temperature_max (hdc302x_handle_t *handle, uint16_t *temperature_raw, float *temperature_s) |
| read temperature max | |
| uint8_t | hdc302x_read_humidity_min (hdc302x_handle_t *handle, uint16_t *humidity_raw, float *humidity_s) |
| read humidity min | |
| uint8_t | hdc302x_read_humidity_max (hdc302x_handle_t *handle, uint16_t *humidity_raw, float *humidity_s) |
| read humidity max | |
| uint8_t | hdc302x_write_set_low_alert (hdc302x_handle_t *handle, uint16_t threshold) |
| write set low alert | |
| uint8_t | hdc302x_write_clear_low_alert (hdc302x_handle_t *handle, uint16_t threshold) |
| write clear low alert | |
| uint8_t | hdc302x_write_set_high_alert (hdc302x_handle_t *handle, uint16_t threshold) |
| write set high alert | |
| uint8_t | hdc302x_write_clear_high_alert (hdc302x_handle_t *handle, uint16_t threshold) |
| write clear high alert | |
| uint8_t | hdc302x_read_set_low_alert (hdc302x_handle_t *handle, uint16_t *threshold) |
| read set low alert | |
| uint8_t | hdc302x_read_set_high_alert (hdc302x_handle_t *handle, uint16_t *threshold) |
| read set high alert | |
| uint8_t | hdc302x_read_clear_low_alert (hdc302x_handle_t *handle, uint16_t *threshold) |
| read clear low alert | |
| uint8_t | hdc302x_read_clear_high_alert (hdc302x_handle_t *handle, uint16_t *threshold) |
| read clear high alert | |
| uint8_t | hdc302x_enable_heater (hdc302x_handle_t *handle) |
| enable heater | |
| uint8_t | hdc302x_disable_heater (hdc302x_handle_t *handle) |
| disable heater | |
| uint8_t | hdc302x_set_heater_power (hdc302x_handle_t *handle, uint16_t power) |
| set heater power | |
| uint8_t | hdc302x_get_heater_power (hdc302x_handle_t *handle, uint16_t *power) |
| get heater power | |
| uint8_t | hdc302x_get_nist_id (hdc302x_handle_t *handle, uint8_t id[6]) |
| get nist id | |
| uint8_t | hdc302x_get_status (hdc302x_handle_t *handle, uint16_t *status) |
| get status | |
| uint8_t | hdc302x_clear_status (hdc302x_handle_t *handle) |
| clear status | |
| uint8_t | hdc302x_nvm_program_alert_threshold (hdc302x_handle_t *handle) |
| nvm program alert threshold | |
| uint8_t | hdc302x_nvm_program_temperature_humidity_offset (hdc302x_handle_t *handle, uint16_t offset) |
| nvm program temperature humidity offset | |
| uint8_t | hdc302x_nvm_read_temperature_humidity_offset (hdc302x_handle_t *handle, uint16_t *offset) |
| nvm read temperature humidity offset | |
| uint8_t | hdc302x_nvm_program_config (hdc302x_handle_t *handle, uint16_t config) |
| nvm program config | |
| uint8_t | hdc302x_nvm_read_config (hdc302x_handle_t *handle, uint16_t *config) |
| nvm read config | |
| uint8_t | hdc302x_alert_threshold_convert_to_register (hdc302x_handle_t *handle, float temperature_deg, float humidity_percentage, uint16_t *reg) |
| convert the alert threshold to the register raw data | |
| uint8_t | hdc302x_alert_threshold_convert_to_data (hdc302x_handle_t *handle, uint16_t reg, float *temperature_deg, float *humidity_percentage) |
| convert the alert threshold to the real data | |
| uint8_t | hdc302x_offset_convert_to_register (hdc302x_handle_t *handle, uint8_t temperature_symbol, float temperature_deg, uint8_t humidity_symbol, float humidity_percentage, uint16_t *reg) |
| convert the offset to the register raw data | |
| uint8_t | hdc302x_offset_convert_to_data (hdc302x_handle_t *handle, uint16_t reg, uint8_t *temperature_symbol, float *temperature_deg, uint8_t *humidity_symbol, float *humidity_percentage) |
| convert the offset to the real data | |
hdc302x base driver modules
| typedef struct hdc302x_handle_s hdc302x_handle_t |
hdc302x handle structure definition
| typedef struct hdc302x_info_s hdc302x_info_t |
hdc302x information structure definition
| enum hdc302x_address_t |
hdc302x address enumeration definition
| Enumerator | |
|---|---|
| HDC302X_ADDRESS_00 | addr - addr1 gnd - gnd |
| HDC302X_ADDRESS_01 | addr - addr1 gnd - vdd |
| HDC302X_ADDRESS_10 | addr - addr1 vdd - gnd |
| HDC302X_ADDRESS_11 | addr - addr1 vdd - vdd |
Definition at line 62 of file driver_hdc302x.h.
| enum hdc302x_auto_mode_t |
hdc302x auto mode enumeration definition
| Enumerator | |
|---|---|
| HDC302X_AUTO_MODE_0P5_HZ | 0.5hz |
| HDC302X_AUTO_MODE_1_HZ | 1hz |
| HDC302X_AUTO_MODE_2_HZ | 2hz |
| HDC302X_AUTO_MODE_4_HZ | 4hz |
| HDC302X_AUTO_MODE_10_HZ | 10hz |
Definition at line 84 of file driver_hdc302x.h.
hdc302x low power mode enumeration definition
| Enumerator | |
|---|---|
| HDC302X_LOW_POWER_MODE_0 | 12.5 ms |
| HDC302X_LOW_POWER_MODE_1 | 7.5 ms |
| HDC302X_LOW_POWER_MODE_2 | 5.0 ms |
| HDC302X_LOW_POWER_MODE_3 | 3.7 ms |
Definition at line 73 of file driver_hdc302x.h.
| enum hdc302x_status_t |
hdc302x status enumeration definition
Definition at line 96 of file driver_hdc302x.h.
| uint8_t hdc302x_alert_threshold_convert_to_data | ( | hdc302x_handle_t * | handle, |
| uint16_t | reg, | ||
| float * | temperature_deg, | ||
| float * | humidity_percentage ) |
convert the alert threshold to the real data
| [in] | *handle | pointer to a hdc302x handle structure |
| [in] | reg | register raw data |
| [out] | *temperature_deg | pointer to a temperature degree celsius buffer |
| [out] | *humidity_percentage | pointer to a humidity percentage buffer |
Definition at line 2279 of file driver_hdc302x.c.
| uint8_t hdc302x_alert_threshold_convert_to_register | ( | hdc302x_handle_t * | handle, |
| float | temperature_deg, | ||
| float | humidity_percentage, | ||
| uint16_t * | reg ) |
convert the alert threshold to the register raw data
| [in] | *handle | pointer to a hdc302x handle structure |
| [in] | temperature_deg | temperature degree celsius |
| [in] | humidity_percentage | humidity percentage |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 2245 of file driver_hdc302x.c.
| uint8_t hdc302x_clear_status | ( | hdc302x_handle_t * | handle | ) |
clear status
| [in] | *handle | pointer to a hdc302x handle structure |
Definition at line 1899 of file driver_hdc302x.c.
| uint8_t hdc302x_continuous_read | ( | hdc302x_handle_t * | handle, |
| uint16_t * | temperature_raw, | ||
| float * | temperature_s, | ||
| uint16_t * | humidity_raw, | ||
| float * | humidity_s ) |
continuous read
| [in] | *handle | pointer to a hdc302x 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 658 of file driver_hdc302x.c.
| uint8_t hdc302x_continuous_read_humidity | ( | hdc302x_handle_t * | handle, |
| uint16_t * | humidity_raw, | ||
| float * | humidity_s ) |
continuous read humidity
| [in] | *handle | pointer to a hdc302x handle structure |
| [out] | *humidity_raw | pointer to a raw humidity buffer |
| [out] | *humidity_s | pointer to a converted humidity buffer |
Definition at line 808 of file driver_hdc302x.c.
| uint8_t hdc302x_deinit | ( | hdc302x_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to a hdc302x handle structure |
Definition at line 2033 of file driver_hdc302x.c.
| uint8_t hdc302x_disable_heater | ( | hdc302x_handle_t * | handle | ) |
disable heater
| [in] | *handle | pointer to a hdc302x handle structure |
Definition at line 1638 of file driver_hdc302x.c.
| uint8_t hdc302x_enable_heater | ( | hdc302x_handle_t * | handle | ) |
enable heater
| [in] | *handle | pointer to a hdc302x handle structure |
Definition at line 1604 of file driver_hdc302x.c.
| uint8_t hdc302x_get_addr | ( | hdc302x_handle_t * | handle, |
| hdc302x_address_t * | addr ) |
get the iic address
| [in] | *handle | pointer to a hdc302x handle structure |
| [out] | *addr | pointer to a chip iic address buffer |
Definition at line 2096 of file driver_hdc302x.c.
| uint8_t hdc302x_get_auto_mode | ( | hdc302x_handle_t * | handle, |
| hdc302x_auto_mode_t * | mode ) |
get auto mode
| [in] | *handle | pointer to a hdc302x handle structure |
| [out] | *mode | pointer to an auto mode buffer |
Definition at line 263 of file driver_hdc302x.c.
| uint8_t hdc302x_get_heater_power | ( | hdc302x_handle_t * | handle, |
| uint16_t * | power ) |
get heater power
| [in] | *handle | pointer to a hdc302x handle structure |
| [out] | *power | pointer to a power buffer |
Definition at line 1738 of file driver_hdc302x.c.
| uint8_t hdc302x_get_low_power_mode | ( | hdc302x_handle_t * | handle, |
| hdc302x_low_power_mode_t * | mode ) |
get low power mode
| [in] | *handle | pointer to a hdc302x handle structure |
| [out] | *mode | pointer to a low power mode buffer |
Definition at line 211 of file driver_hdc302x.c.
| uint8_t hdc302x_get_nist_id | ( | hdc302x_handle_t * | handle, |
| uint8_t | id[6] ) |
get nist id
| [in] | *handle | pointer to a hdc302x handle structure |
| [out] | *id | pointer to an id buffer |
Definition at line 1782 of file driver_hdc302x.c.
| uint8_t hdc302x_get_status | ( | hdc302x_handle_t * | handle, |
| uint16_t * | status ) |
get status
| [in] | *handle | pointer to a hdc302x handle structure |
| [out] | *status | pointer to a status buffer |
Definition at line 1857 of file driver_hdc302x.c.
| uint8_t hdc302x_info | ( | hdc302x_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to a hdc302x info structure |
Definition at line 2484 of file driver_hdc302x.c.
| uint8_t hdc302x_init | ( | hdc302x_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to a hdc302x handle structure |
Definition at line 1935 of file driver_hdc302x.c.
| uint8_t hdc302x_irq_handler | ( | hdc302x_handle_t * | handle | ) |
irq handler
| [in] | *handle | pointer to a hdc302x handle structure |
Definition at line 2119 of file driver_hdc302x.c.
| uint8_t hdc302x_nvm_program_alert_threshold | ( | hdc302x_handle_t * | handle | ) |
nvm program alert threshold
| [in] | *handle | pointer to a hdc302x handle structure |
Definition at line 1401 of file driver_hdc302x.c.
| uint8_t hdc302x_nvm_program_config | ( | hdc302x_handle_t * | handle, |
| uint16_t | config ) |
nvm program config
| [in] | *handle | pointer to a hdc302x handle structure |
| [in] | config | nvm config |
Definition at line 1521 of file driver_hdc302x.c.
| uint8_t hdc302x_nvm_program_temperature_humidity_offset | ( | hdc302x_handle_t * | handle, |
| uint16_t | offset ) |
nvm program temperature humidity offset
| [in] | *handle | pointer to a hdc302x handle structure |
| [in] | offset | set offset |
Definition at line 1437 of file driver_hdc302x.c.
| uint8_t hdc302x_nvm_read_config | ( | hdc302x_handle_t * | handle, |
| uint16_t * | config ) |
nvm read config
| [in] | *handle | pointer to a hdc302x handle structure |
| [out] | *config | pointer to a config buffer |
Definition at line 1562 of file driver_hdc302x.c.
| uint8_t hdc302x_nvm_read_temperature_humidity_offset | ( | hdc302x_handle_t * | handle, |
| uint16_t * | offset ) |
nvm read temperature humidity offset
| [in] | *handle | pointer to a hdc302x handle structure |
| [out] | *offset | pointer to an offset buffer |
Definition at line 1478 of file driver_hdc302x.c.
| uint8_t hdc302x_offset_convert_to_data | ( | hdc302x_handle_t * | handle, |
| uint16_t | reg, | ||
| uint8_t * | temperature_symbol, | ||
| float * | temperature_deg, | ||
| uint8_t * | humidity_symbol, | ||
| float * | humidity_percentage ) |
convert the offset to the real data
| [in] | *handle | pointer to a hdc302x handle structure |
| [in] | reg | register raw data |
| [out] | *temperature_symbol | pointer to a temperature symbol buffer |
| [out] | *temperature_deg | pointer to a temperature degree celsius buffer |
| [out] | *humidity_symbol | pointer to a humidity symbol buffer |
| [out] | *humidity_percentage | pointer to a humidity percentage buffer |
Definition at line 2365 of file driver_hdc302x.c.
| uint8_t hdc302x_offset_convert_to_register | ( | hdc302x_handle_t * | handle, |
| uint8_t | temperature_symbol, | ||
| float | temperature_deg, | ||
| uint8_t | humidity_symbol, | ||
| float | humidity_percentage, | ||
| uint16_t * | reg ) |
convert the offset to the register raw data
| [in] | *handle | pointer to a hdc302x handle structure |
| [in] | temperature_symbol | temperature symbol, 1 is positive, 0 is negative |
| [in] | temperature_deg | temperature degree celsius |
| [in] | humidity_symbol | humidity symbol, 1 is positive, 0 is negative |
| [in] | humidity_percentage | humidity percentage |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 2317 of file driver_hdc302x.c.
| uint8_t hdc302x_read_clear_high_alert | ( | hdc302x_handle_t * | handle, |
| uint16_t * | threshold ) |
read clear high alert
| [in] | *handle | pointer to a hdc302x handle structure |
| [out] | *threshold | pointer to an alert threshold buffer |
Definition at line 1359 of file driver_hdc302x.c.
| uint8_t hdc302x_read_clear_low_alert | ( | hdc302x_handle_t * | handle, |
| uint16_t * | threshold ) |
read clear low alert
| [in] | *handle | pointer to a hdc302x handle structure |
| [out] | *threshold | pointer to an alert threshold buffer |
Definition at line 1315 of file driver_hdc302x.c.
| uint8_t hdc302x_read_humidity_max | ( | hdc302x_handle_t * | handle, |
| uint16_t * | humidity_raw, | ||
| float * | humidity_s ) |
read humidity max
| [in] | *handle | pointer to a hdc302x handle structure |
| [out] | *humidity_raw | pointer to a raw humidity buffer |
| [out] | *humidity_s | pointer to a converted humidity buffer |
Definition at line 1020 of file driver_hdc302x.c.
| uint8_t hdc302x_read_humidity_min | ( | hdc302x_handle_t * | handle, |
| uint16_t * | humidity_raw, | ||
| float * | humidity_s ) |
read humidity min
| [in] | *handle | pointer to a hdc302x handle structure |
| [out] | *humidity_raw | pointer to a raw humidity buffer |
| [out] | *humidity_s | pointer to a converted humidity buffer |
Definition at line 967 of file driver_hdc302x.c.
| uint8_t hdc302x_read_set_high_alert | ( | hdc302x_handle_t * | handle, |
| uint16_t * | threshold ) |
read set high alert
| [in] | *handle | pointer to a hdc302x handle structure |
| [out] | *threshold | pointer to an alert threshold buffer |
Definition at line 1271 of file driver_hdc302x.c.
| uint8_t hdc302x_read_set_low_alert | ( | hdc302x_handle_t * | handle, |
| uint16_t * | threshold ) |
read set low alert
| [in] | *handle | pointer to a hdc302x handle structure |
| [out] | *threshold | pointer to an alert threshold buffer |
Definition at line 1227 of file driver_hdc302x.c.
| uint8_t hdc302x_read_temperature_max | ( | hdc302x_handle_t * | handle, |
| uint16_t * | temperature_raw, | ||
| float * | temperature_s ) |
read temperature max
| [in] | *handle | pointer to a hdc302x handle structure |
| [out] | *temperature_raw | pointer to a raw temperature buffer |
| [out] | *temperature_s | pointer to a converted temperature buffer |
Definition at line 914 of file driver_hdc302x.c.
| uint8_t hdc302x_read_temperature_min | ( | hdc302x_handle_t * | handle, |
| uint16_t * | temperature_raw, | ||
| float * | temperature_s ) |
read temperature min
| [in] | *handle | pointer to a hdc302x handle structure |
| [out] | *temperature_raw | pointer to a raw temperature buffer |
| [out] | *temperature_s | pointer to a converted temperature buffer |
Definition at line 861 of file driver_hdc302x.c.
| uint8_t hdc302x_set_addr | ( | hdc302x_handle_t * | handle, |
| hdc302x_address_t | addr ) |
set the iic address
| [in] | *handle | pointer to a hdc302x handle structure |
| [in] | addr | chip iic address |
Definition at line 2074 of file driver_hdc302x.c.
| uint8_t hdc302x_set_auto_mode | ( | hdc302x_handle_t * | handle, |
| hdc302x_auto_mode_t | mode ) |
set auto mode
| [in] | *handle | pointer to a hdc302x handle structure |
| [in] | mode | auto mode |
Definition at line 237 of file driver_hdc302x.c.
| uint8_t hdc302x_set_heater_power | ( | hdc302x_handle_t * | handle, |
| uint16_t | power ) |
set heater power
| [in] | *handle | pointer to a hdc302x handle structure |
| [in] | power | heater power |
Definition at line 1692 of file driver_hdc302x.c.
| uint8_t hdc302x_set_low_power_mode | ( | hdc302x_handle_t * | handle, |
| hdc302x_low_power_mode_t | mode ) |
set low power mode
| [in] | *handle | pointer to a hdc302x handle structure |
| [in] | mode | low power mode |
Definition at line 185 of file driver_hdc302x.c.
| uint8_t hdc302x_single_read | ( | hdc302x_handle_t * | handle, |
| uint16_t * | temperature_raw, | ||
| float * | temperature_s, | ||
| uint16_t * | humidity_raw, | ||
| float * | humidity_s ) |
single read
| [in] | *handle | pointer to a hdc302x 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 723 of file driver_hdc302x.c.
| uint8_t hdc302x_soft_reset | ( | hdc302x_handle_t * | handle | ) |
soft reset
| [in] | *handle | pointer to a hdc302x handle structure |
Definition at line 289 of file driver_hdc302x.c.
| uint8_t hdc302x_start_continuous_read | ( | hdc302x_handle_t * | handle | ) |
start continuous read
| [in] | *handle | pointer to a hdc302x handle structure |
Definition at line 326 of file driver_hdc302x.c.
| uint8_t hdc302x_stop_continuous_read | ( | hdc302x_handle_t * | handle | ) |
stop continuous read
| [in] | *handle | pointer to a hdc302x handle structure |
Definition at line 617 of file driver_hdc302x.c.
| uint8_t hdc302x_write_clear_high_alert | ( | hdc302x_handle_t * | handle, |
| uint16_t | threshold ) |
write clear high alert
| [in] | *handle | pointer to a hdc302x handle structure |
| [in] | threshold | alert threshold |
Definition at line 1187 of file driver_hdc302x.c.
| uint8_t hdc302x_write_clear_low_alert | ( | hdc302x_handle_t * | handle, |
| uint16_t | threshold ) |
write clear low alert
| [in] | *handle | pointer to a hdc302x handle structure |
| [in] | threshold | alert threshold |
Definition at line 1109 of file driver_hdc302x.c.
| uint8_t hdc302x_write_set_high_alert | ( | hdc302x_handle_t * | handle, |
| uint16_t | threshold ) |
write set high alert
| [in] | *handle | pointer to a hdc302x handle structure |
| [in] | threshold | alert threshold |
Definition at line 1148 of file driver_hdc302x.c.
| uint8_t hdc302x_write_set_low_alert | ( | hdc302x_handle_t * | handle, |
| uint16_t | threshold ) |
write set low alert
| [in] | *handle | pointer to a hdc302x handle structure |
| [in] | threshold | alert threshold |
Definition at line 1070 of file driver_hdc302x.c.