153#define DRIVER_SHT85_LINK_INIT(HANDLE, STRUCTURE) memset(HANDLE, 0, sizeof(STRUCTURE))
161#define DRIVER_SHT85_LINK_IIC_INIT(HANDLE, FUC) (HANDLE)->iic_init = FUC
169#define DRIVER_SHT85_LINK_IIC_DEINIT(HANDLE, FUC) (HANDLE)->iic_deinit = FUC
177#define DRIVER_SHT85_LINK_IIC_READ_ADDRESS16(HANDLE, FUC) (HANDLE)->iic_read_address16 = FUC
185#define DRIVER_SHT85_LINK_IIC_WRITE_ADDRESS16(HANDLE, FUC) (HANDLE)->iic_write_address16 = FUC
193#define DRIVER_SHT85_LINK_DELAY_MS(HANDLE, FUC) (HANDLE)->delay_ms = FUC
201#define DRIVER_SHT85_LINK_DEBUG_PRINT(HANDLE, FUC) (HANDLE)->debug_print = FUC
209#define DRIVER_SHT85_LINK_RECEIVE_CALLBACK(HANDLE, FUC) (HANDLE)->receive_callback = FUC
271 uint16_t *temperature_raw,
float *temperature_s,
272 uint16_t *humidity_raw,
float *humidity_s);
314 uint16_t *temperature_raw,
float *temperature_s,
315 uint16_t *humidity_raw,
float *humidity_s);
uint8_t sht85_start_continuous_read(sht85_handle_t *handle, sht85_rate_t rate)
start reading
uint8_t sht85_continuous_read(sht85_handle_t *handle, uint16_t *temperature_raw, float *temperature_s, uint16_t *humidity_raw, float *humidity_s)
read data continuously
uint8_t sht85_set_heater(sht85_handle_t *handle, sht85_bool_t enable)
enable or disable the chip heater
uint8_t sht85_clear_status(sht85_handle_t *handle)
clear the current status
uint8_t sht85_get_serial_number(sht85_handle_t *handle, uint8_t sn[4])
get serial number
struct sht85_info_s sht85_info_t
sht85 information structure definition
uint8_t sht85_init(sht85_handle_t *handle)
initialize the chip
uint8_t sht85_set_repeatability(sht85_handle_t *handle, sht85_repeatability_t repeatability)
set the measurement repeatability
sht85_repeatability_t
sht85 repeatability enumeration definition
sht85_status_t
sht85 status enumeration definition
uint8_t sht85_stop_continuous_read(sht85_handle_t *handle)
stop reading
uint8_t sht85_deinit(sht85_handle_t *handle)
close the chip
uint8_t sht85_info(sht85_info_t *info)
get chip's information
sht85_rate_t
sht85 rate enumeration definition
uint8_t sht85_set_art(sht85_handle_t *handle)
set the chip art
sht85_bool_t
sht85 bool enumeration definition
uint8_t sht85_get_status(sht85_handle_t *handle, uint16_t *status)
get the current status
struct sht85_handle_s sht85_handle_t
sht85 handle structure definition
uint8_t sht85_single_read(sht85_handle_t *handle, uint16_t *temperature_raw, float *temperature_s, uint16_t *humidity_raw, float *humidity_s)
read data once
uint8_t sht85_soft_reset(sht85_handle_t *handle)
soft reset the chip
uint8_t sht85_get_repeatability(sht85_handle_t *handle, sht85_repeatability_t *repeatability)
get the measurement repeatability
@ SHT85_REPEATABILITY_HIGH
@ SHT85_REPEATABILITY_LOW
@ SHT85_REPEATABILITY_MEDIUM
@ SHT85_STATUS_SYSTEM_RESET
@ SHT85_STATUS_ALERT_PENDING_STATUS
@ SHT85_STATUS_HUMIDITY_ALERT
@ SHT85_STATUS_COMMAND_STATUS
@ SHT85_STATUS_TEMPERATURE_ALERT
@ SHT85_STATUS_CHECKSUM_STATUS
uint8_t sht85_set_reg(sht85_handle_t *handle, uint16_t command)
set the chip register
uint8_t sht85_get_reg(sht85_handle_t *handle, uint16_t command, uint8_t *buf, uint16_t len)
get the chip register
sht85 handle structure definition
void(* delay_ms)(uint32_t ms)
uint8_t(* iic_read_address16)(uint8_t addr, uint16_t reg, uint8_t *buf, uint16_t len)
void(* debug_print)(const char *const fmt,...)
void(* receive_callback)(uint16_t type)
uint8_t(* iic_init)(void)
uint8_t(* iic_write_address16)(uint8_t addr, uint16_t reg, uint8_t *buf, uint16_t len)
uint8_t(* iic_deinit)(void)
sht85 information structure definition
float supply_voltage_max_v
char manufacturer_name[32]
float supply_voltage_min_v