![]() |
LibDriver HDC1080
|
driver hdc1080 header file More...
#include <stdio.h>#include <stdint.h>#include <string.h>Go to the source code of this file.
Data Structures | |
| struct | hdc1080_handle_s |
| hdc1080 handle structure definition More... | |
| struct | hdc1080_info_s |
| hdc1080 information structure definition More... | |
Macros | |
| #define | DRIVER_HDC1080_LINK_INIT(HANDLE, STRUCTURE) |
| initialize hdc1080_handle_t structure | |
| #define | DRIVER_HDC1080_LINK_IIC_INIT(HANDLE, FUC) |
| link iic_init function | |
| #define | DRIVER_HDC1080_LINK_IIC_DEINIT(HANDLE, FUC) |
| link iic_deinit function | |
| #define | DRIVER_HDC1080_LINK_IIC_READ(HANDLE, FUC) |
| link iic_read function | |
| #define | DRIVER_HDC1080_LINK_IIC_READ_WITH_WAIT(HANDLE, FUC) |
| link iic_read_with_wait function | |
| #define | DRIVER_HDC1080_LINK_IIC_WRITE(HANDLE, FUC) |
| link iic_write function | |
| #define | DRIVER_HDC1080_LINK_DELAY_MS(HANDLE, FUC) |
| link delay_ms function | |
| #define | DRIVER_HDC1080_LINK_DEBUG_PRINT(HANDLE, FUC) |
| link debug_print function | |
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 | |
| uint8_t | hdc1080_set_reg (hdc1080_handle_t *handle, uint8_t reg, uint16_t data) |
| set chip register | |
| uint8_t | hdc1080_get_reg (hdc1080_handle_t *handle, uint8_t reg, uint16_t *data) |
| get chip register | |
driver hdc1080 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 |
|---|---|---|---|
| 2023/04/30 | 1.0 | Shifeng Li | first upload |
Definition in file driver_hdc1080.h.