![]() |
LibDriver HTU31D
|
driver htu31d header file More...
#include <stdio.h>#include <stdint.h>#include <string.h>Go to the source code of this file.
Data Structures | |
| struct | htu31d_handle_s |
| htu31d handle structure definition More... | |
| struct | htu31d_info_s |
| htu31d information structure definition More... | |
Macros | |
| #define | DRIVER_HTU31D_LINK_INIT(HANDLE, STRUCTURE) |
| initialize htu31d_handle_t structure | |
| #define | DRIVER_HTU31D_LINK_IIC_INIT(HANDLE, FUC) |
| link iic_init function | |
| #define | DRIVER_HTU31D_LINK_IIC_DEINIT(HANDLE, FUC) |
| link iic_deinit function | |
| #define | DRIVER_HTU31D_LINK_IIC_WRITE(HANDLE, FUC) |
| link iic_write function | |
| #define | DRIVER_HTU31D_LINK_IIC_READ(HANDLE, FUC) |
| link iic_read function | |
| #define | DRIVER_HTU31D_LINK_DELAY_MS(HANDLE, FUC) |
| link delay_ms function | |
| #define | DRIVER_HTU31D_LINK_DEBUG_PRINT(HANDLE, FUC) |
| link debug_print function | |
Typedefs | |
| typedef struct htu31d_handle_s | htu31d_handle_t |
| htu31d handle structure definition | |
| typedef struct htu31d_info_s | htu31d_info_t |
| htu31d information structure definition | |
Functions | |
| uint8_t | htu31d_info (htu31d_info_t *info) |
| get chip's information | |
| uint8_t | htu31d_set_addr_pin (htu31d_handle_t *handle, htu31d_addr_pin_t addr_pin) |
| set the address pin | |
| uint8_t | htu31d_get_addr_pin (htu31d_handle_t *handle, htu31d_addr_pin_t *addr_pin) |
| get the address pin | |
| uint8_t | htu31d_init (htu31d_handle_t *handle) |
| initialize the chip | |
| uint8_t | htu31d_deinit (htu31d_handle_t *handle) |
| close the chip | |
| uint8_t | htu31d_set_humidity_osr (htu31d_handle_t *handle, htu31d_humidity_osr_t osr) |
| set humidity osr | |
| uint8_t | htu31d_get_humidity_osr (htu31d_handle_t *handle, htu31d_humidity_osr_t *osr) |
| get humidity osr | |
| uint8_t | htu31d_set_temperature_osr (htu31d_handle_t *handle, htu31d_temperature_osr_t osr) |
| set temperature osr | |
| uint8_t | htu31d_get_temperature_osr (htu31d_handle_t *handle, htu31d_temperature_osr_t *osr) |
| get temperature osr | |
| uint8_t | htu31d_read_temperature_humidity (htu31d_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 | htu31d_read_humidity (htu31d_handle_t *handle, uint16_t *humidity_raw, float *humidity_s) |
| read the humidity data | |
| uint8_t | htu31d_soft_reset (htu31d_handle_t *handle) |
| soft reset | |
| uint8_t | htu31d_set_heater_on (htu31d_handle_t *handle) |
| enable heater | |
| uint8_t | htu31d_set_heater_off (htu31d_handle_t *handle) |
| disable heater | |
| uint8_t | htu31d_get_serial_number (htu31d_handle_t *handle, uint8_t number[3]) |
| get the serial number | |
| uint8_t | htu31d_get_diagnostic (htu31d_handle_t *handle, uint8_t *diagnostic) |
| get the diagnostic | |
| uint8_t | htu31d_set_reg (htu31d_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len) |
| set the chip register | |
| uint8_t | htu31d_get_reg (htu31d_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len) |
| get the chip register | |
driver htu31d 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 |
|---|---|---|---|
| 2024/02/28 | 1.0 | Shifeng Li | first upload |
Definition in file driver_htu31d.h.