37 #ifndef DRIVER_AHT30_H
38 #define DRIVER_AHT30_H
120 #define DRIVER_AHT30_LINK_INIT(HANDLE, STRUCTURE) memset(HANDLE, 0, sizeof(STRUCTURE))
128 #define DRIVER_AHT30_LINK_IIC_INIT(HANDLE, FUC) (HANDLE)->iic_init = FUC
136 #define DRIVER_AHT30_LINK_IIC_DEINIT(HANDLE, FUC) (HANDLE)->iic_deinit = FUC
144 #define DRIVER_AHT30_LINK_IIC_READ_CMD(HANDLE, FUC) (HANDLE)->iic_read_cmd = FUC
152 #define DRIVER_AHT30_LINK_IIC_WRITE_CMD(HANDLE, FUC) (HANDLE)->iic_write_cmd = FUC
160 #define DRIVER_AHT30_LINK_DELAY_MS(HANDLE, FUC) (HANDLE)->delay_ms = FUC
168 #define DRIVER_AHT30_LINK_DEBUG_PRINT(HANDLE, FUC) (HANDLE)->debug_print = FUC
234 uint32_t *humidity_raw, uint8_t *humidity_s);
uint8_t aht30_deinit(aht30_handle_t *handle)
close the chip
uint8_t aht30_read_humidity(aht30_handle_t *handle, uint32_t *humidity_raw, uint8_t *humidity_s)
read the humidity data
uint8_t aht30_read_temperature(aht30_handle_t *handle, uint32_t *temperature_raw, float *temperature_s)
read the temperature
uint8_t aht30_init(aht30_handle_t *handle)
initialize the chip
uint8_t aht30_read_temperature_humidity(aht30_handle_t *handle, uint32_t *temperature_raw, float *temperature_s, uint32_t *humidity_raw, uint8_t *humidity_s)
read the temperature and humidity data
aht30_status_t
aht30 status enumeration definition
struct aht30_handle_s aht30_handle_t
aht30 handle structure definition
uint8_t aht30_info(aht30_info_t *info)
get chip's information
uint8_t aht30_get_status(aht30_handle_t *handle, uint8_t *status)
get status
struct aht30_info_s aht30_info_t
aht30 information structure definition
@ AHT30_STATUS_CALIBRATION_ENABLE
uint8_t aht30_get_reg(aht30_handle_t *handle, uint8_t *buf, uint16_t len)
get the chip register
uint8_t aht30_set_reg(aht30_handle_t *handle, uint8_t *buf, uint16_t len)
set the chip register
aht30 handle structure definition
void(* delay_ms)(uint32_t ms)
void(* debug_print)(const char *const fmt,...)
uint8_t(* iic_init)(void)
uint8_t(* iic_read_cmd)(uint8_t addr, uint8_t *buf, uint16_t len)
uint8_t(* iic_deinit)(void)
uint8_t(* iic_write_cmd)(uint8_t addr, uint8_t *buf, uint16_t len)
aht30 information structure definition
float supply_voltage_max_v
char manufacturer_name[32]
float supply_voltage_min_v