![]() |
LibDriver HDC302X
|
driver hdc302x header file More...
#include <stdio.h>#include <stdint.h>#include <string.h>Go to the source code of this file.
Data Structures | |
| struct | hdc302x_handle_s |
| hdc302x handle structure definition More... | |
| struct | hdc302x_info_s |
| hdc302x information structure definition More... | |
Macros | |
| #define | DRIVER_HDC302X_LINK_INIT(HANDLE, STRUCTURE) |
| initialize hdc302x_handle_t structure | |
| #define | DRIVER_HDC302X_LINK_IIC_INIT(HANDLE, FUC) |
| link iic_init function | |
| #define | DRIVER_HDC302X_LINK_IIC_DEINIT(HANDLE, FUC) |
| link iic_deinit function | |
| #define | DRIVER_HDC302X_LINK_IIC_READ_ADDRESS16(HANDLE, FUC) |
| link iic_read_address16 function | |
| #define | DRIVER_HDC302X_LINK_IIC_WRITE_ADDRESS16(HANDLE, FUC) |
| link iic_write_address16 function | |
| #define | DRIVER_HDC302X_LINK_DELAY_MS(HANDLE, FUC) |
| link delay_ms function | |
| #define | DRIVER_HDC302X_LINK_DEBUG_PRINT(HANDLE, FUC) |
| link debug_print function | |
| #define | DRIVER_HDC302X_LINK_RECEIVE_CALLBACK(HANDLE, FUC) |
| link receive_callback function | |
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 | |
| uint8_t | hdc302x_set_reg (hdc302x_handle_t *handle, uint16_t command, uint8_t *buf, uint16_t len) |
| set the chip register | |
| uint8_t | hdc302x_get_reg (hdc302x_handle_t *handle, uint16_t command, uint8_t *buf, uint16_t len) |
| get the chip register | |
driver hdc302x header file
Copyright (c) 2015 - present LibDriver All rights reserved
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
| Date | Version | Author | Description |
|---|---|---|---|
| 2025/12/25 | 1.0 | Shifeng Li | first upload |
Definition in file driver_hdc302x.h.