![]() |
LibDriver SHTC3
|
driver shtc3 source file More...
#include "driver_shtc3.h"Go to the source code of this file.
Macros | |
| #define | CHIP_NAME "Sensirion SHTC3" |
| chip information definition | |
| #define | MANUFACTURER_NAME "Sensirion" |
| #define | SUPPLY_VOLTAGE_MIN 1.62f |
| #define | SUPPLY_VOLTAGE_MAX 3.6f |
| #define | MAX_CURRENT 0.9f |
| #define | TEMPERATURE_MIN -40.0f |
| #define | TEMPERATURE_MAX 125.0f |
| #define | DRIVER_VERSION 1000 |
| #define | SHTC3_ADDRESS (0x70 << 1) |
| chip address definition | |
| #define | SHTC3_COMMAND_READ_ID 0xEFC8U |
| chip command definition | |
| #define | SHTC3_COMMAND_SOFT_RESET 0x805DU |
| #define | SHTC3_COMMAND_SLEEP 0xB098U |
| #define | SHTC3_COMMAND_WAKEUP 0x3517U |
| #define | SHTC3_COMMAND_MEAS_T_POLLING 0x7866U |
| #define | SHTC3_COMMAND_MEAS_T_CLOCKSTR 0x7CA2U |
| #define | SHTC3_COMMAND_MEAS_RH_POLLING 0x58E0U |
| #define | SHTC3_COMMAND_MEAS_RH_CLOCKSTR 0x5C24U |
| #define | SHTC3_COMMAND_LP_MEAS_T_POLLING 0x609CU |
| #define | SHTC3_COMMAND_LP_MEAS_T_CLOCKSTR 0x6458U |
| #define | SHTC3_COMMAND_LP_MEAS_RH_POLLING 0x401AU |
| #define | SHTC3_COMMAND_LP_MEAS_RH_CLOCKSTR 0x44DEU |
Functions | |
| uint8_t | shtc3_init (shtc3_handle_t *handle) |
| initialize the chip | |
| uint8_t | shtc3_deinit (shtc3_handle_t *handle) |
| close the chip | |
| uint8_t | shtc3_read (shtc3_handle_t *handle, shtc3_bool_t clock_stretching_enable, uint16_t *temperature_raw, float *temperature_s, uint16_t *humidity_raw, float *humidity_s) |
| normal read | |
| uint8_t | shtc3_read_low_power (shtc3_handle_t *handle, shtc3_bool_t clock_stretching_enable, uint16_t *temperature_raw, float *temperature_s, uint16_t *humidity_raw, float *humidity_s) |
| read in low power mode | |
| uint8_t | shtc3_soft_reset (shtc3_handle_t *handle) |
| soft reset the chip | |
| uint8_t | shtc3_sleep (shtc3_handle_t *handle) |
| sleep | |
| uint8_t | shtc3_wakeup (shtc3_handle_t *handle) |
| wakeup | |
| uint8_t | shtc3_set_reg (shtc3_handle_t *handle, uint16_t command) |
| set the chip register | |
| uint8_t | shtc3_get_reg (shtc3_handle_t *handle, uint16_t command, uint8_t *buf, uint16_t len) |
| get the chip register | |
| uint8_t | shtc3_info (shtc3_info_t *info) |
| get chip's information | |
driver shtc3 source 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/11/03 | 1.0 | Shifeng Li | first upload |
Definition in file driver_shtc3.c.
| #define CHIP_NAME "Sensirion SHTC3" |
| #define DRIVER_VERSION 1000 |
driver version
Definition at line 49 of file driver_shtc3.c.
| #define MANUFACTURER_NAME "Sensirion" |
manufacturer name
Definition at line 43 of file driver_shtc3.c.
| #define MAX_CURRENT 0.9f |
chip max current
Definition at line 46 of file driver_shtc3.c.
| #define SHTC3_ADDRESS (0x70 << 1) |
| #define SHTC3_COMMAND_LP_MEAS_RH_CLOCKSTR 0x44DEU |
read rh first, clock stretching enabled command
Definition at line 70 of file driver_shtc3.c.
| #define SHTC3_COMMAND_LP_MEAS_RH_POLLING 0x401AU |
read rh first, clock stretching disabled command
Definition at line 69 of file driver_shtc3.c.
| #define SHTC3_COMMAND_LP_MEAS_T_CLOCKSTR 0x6458U |
read t first, clock stretching enabled command
Definition at line 68 of file driver_shtc3.c.
| #define SHTC3_COMMAND_LP_MEAS_T_POLLING 0x609CU |
read t first, clock stretching disabled command
Definition at line 67 of file driver_shtc3.c.
| #define SHTC3_COMMAND_MEAS_RH_CLOCKSTR 0x5C24U |
read rh first, clock stretching enabled command
Definition at line 66 of file driver_shtc3.c.
| #define SHTC3_COMMAND_MEAS_RH_POLLING 0x58E0U |
read rh first, clock stretching disabled command
Definition at line 65 of file driver_shtc3.c.
| #define SHTC3_COMMAND_MEAS_T_CLOCKSTR 0x7CA2U |
read t first, clock stretching enabled command
Definition at line 64 of file driver_shtc3.c.
| #define SHTC3_COMMAND_MEAS_T_POLLING 0x7866U |
read t first, clock stretching disabled command
Definition at line 63 of file driver_shtc3.c.
| #define SHTC3_COMMAND_READ_ID 0xEFC8U |
| #define SHTC3_COMMAND_SLEEP 0xB098U |
sleep command
Definition at line 61 of file driver_shtc3.c.
| #define SHTC3_COMMAND_SOFT_RESET 0x805DU |
soft reset command
Definition at line 60 of file driver_shtc3.c.
| #define SHTC3_COMMAND_WAKEUP 0x3517U |
wakeup command
Definition at line 62 of file driver_shtc3.c.
| #define SUPPLY_VOLTAGE_MAX 3.6f |
chip max supply voltage
Definition at line 45 of file driver_shtc3.c.
| #define SUPPLY_VOLTAGE_MIN 1.62f |
chip min supply voltage
Definition at line 44 of file driver_shtc3.c.
| #define TEMPERATURE_MAX 125.0f |
chip max operating temperature
Definition at line 48 of file driver_shtc3.c.
| #define TEMPERATURE_MIN -40.0f |
chip min operating temperature
Definition at line 47 of file driver_shtc3.c.