145 uint16_t temperature_raw;
146 uint16_t humidity_raw;
149 if (
sht31_continuous_read(&gs_handle, (uint16_t *)&temperature_raw, temperature, (uint16_t *)&humidity_raw, humidity) != 0)
driver sht31 basic header file
uint8_t sht31_start_continuous_read(sht31_handle_t *handle, sht31_rate_t rate)
start reading
uint8_t sht31_get_serial_number(sht31_handle_t *handle, uint8_t sn[4])
get serial number
uint8_t sht31_stop_continuous_read(sht31_handle_t *handle)
stop reading
uint8_t sht31_set_heater(sht31_handle_t *handle, sht31_bool_t enable)
enable or disable the chip heater
uint8_t sht31_set_repeatability(sht31_handle_t *handle, sht31_repeatability_t repeatability)
set the measurement repeatability
uint8_t sht31_set_art(sht31_handle_t *handle)
set the chip art
uint8_t sht31_set_addr_pin(sht31_handle_t *handle, sht31_address_t addr_pin)
set the iic address pin
struct sht31_handle_s sht31_handle_t
sht31 handle structure definition
sht31_address_t
sht31 address enumeration definition
uint8_t sht31_deinit(sht31_handle_t *handle)
close the chip
uint8_t sht31_continuous_read(sht31_handle_t *handle, uint16_t *temperature_raw, float *temperature_s, uint16_t *humidity_raw, float *humidity_s)
read data continuously
uint8_t sht31_init(sht31_handle_t *handle)
initialize the chip
#define SHT31_BASIC_DEFAULT_HEATER
uint8_t sht31_basic_read(float *temperature, float *humidity)
basic example read
uint8_t sht31_basic_init(sht31_address_t addr_pin)
basic example init
#define SHT31_BASIC_DEFAULT_REPEATABILITY
uint8_t sht31_basic_deinit(void)
basic example deinit
uint8_t sht31_basic_get_serial_number(uint8_t sn[4])
basic example get serial number
#define SHT31_BASIC_DEFAULT_RATE
sht31 basic example default definition
void sht31_interface_debug_print(const char *const fmt,...)
interface print format data
uint8_t sht31_interface_iic_init(void)
interface iic bus init
uint8_t sht31_interface_iic_read_address16(uint8_t addr, uint16_t reg, uint8_t *buf, uint16_t len)
interface iic bus read with 16 bits register address
uint8_t sht31_interface_iic_deinit(void)
interface iic bus deinit
uint8_t sht31_interface_iic_write_address16(uint8_t addr, uint16_t reg, uint8_t *buf, uint16_t len)
interface iic bus write with 16 bits register address
void sht31_interface_delay_ms(uint32_t ms)
interface delay ms
void sht31_interface_receive_callback(uint16_t type)
interface receive callback
#define DRIVER_SHT31_LINK_IIC_WRITE_ADDRESS16(HANDLE, FUC)
link iic_write_address16 function
#define DRIVER_SHT31_LINK_IIC_DEINIT(HANDLE, FUC)
link iic_deinit function
#define DRIVER_SHT31_LINK_INIT(HANDLE, STRUCTURE)
initialize sht31_handle_t structure
#define DRIVER_SHT31_LINK_DELAY_MS(HANDLE, FUC)
link delay_ms function
#define DRIVER_SHT31_LINK_IIC_INIT(HANDLE, FUC)
link iic_init function
#define DRIVER_SHT31_LINK_DEBUG_PRINT(HANDLE, FUC)
link debug_print function
#define DRIVER_SHT31_LINK_RECEIVE_CALLBACK(HANDLE, FUC)
link receive_callback function
#define DRIVER_SHT31_LINK_IIC_READ_ADDRESS16(HANDLE, FUC)
link iic_read_address16 function