106#define DRIVER_SGP41_LINK_INIT(HANDLE, STRUCTURE) memset(HANDLE, 0, sizeof(STRUCTURE))
114#define DRIVER_SGP41_LINK_IIC_INIT(HANDLE, FUC) (HANDLE)->iic_init = FUC
122#define DRIVER_SGP41_LINK_IIC_DEINIT(HANDLE, FUC) (HANDLE)->iic_deinit = FUC
130#define DRIVER_SGP41_LINK_IIC_WRITE_COMMAND(HANDLE, FUC) (HANDLE)->iic_write_cmd = FUC
138#define DRIVER_SGP41_LINK_IIC_READ_COMMAND(HANDLE, FUC) (HANDLE)->iic_read_cmd = FUC
146#define DRIVER_SGP41_LINK_DELAY_MS(HANDLE, FUC) (HANDLE)->delay_ms = FUC
154#define DRIVER_SGP41_LINK_DEBUG_PRINT(HANDLE, FUC) (HANDLE)->debug_print = FUC
230 uint16_t *sraw_voc, uint16_t *sraw_nox);
uint8_t sgp41_temperature_convert_to_register(sgp41_handle_t *handle, float temp, uint16_t *reg)
convert the temperature to the register data
uint8_t sgp41_get_measure_raw(sgp41_handle_t *handle, uint16_t raw_humidity, uint16_t raw_temperature, uint16_t *sraw_voc, uint16_t *sraw_nox)
get the measure raw result
uint8_t sgp41_get_execute_conditioning(sgp41_handle_t *handle, uint16_t *sraw_voc)
get execute conditioning
uint8_t sgp41_info(sgp41_info_t *info)
get chip information
uint8_t sgp41_deinit(sgp41_handle_t *handle)
close the chip
struct sgp41_info_s sgp41_info_t
sgp41 information structure definition
uint8_t sgp41_get_measure_test(sgp41_handle_t *handle, uint16_t *result)
get the chip measure test
uint8_t sgp41_turn_heater_off(sgp41_handle_t *handle)
turn heater off
uint8_t sgp41_soft_reset(sgp41_handle_t *handle)
soft reset the chip
struct sgp41_handle_s sgp41_handle_t
sgp41 handle structure definition
uint8_t sgp41_get_serial_id(sgp41_handle_t *handle, uint16_t id[3])
get the chip serial id
uint8_t sgp41_init(sgp41_handle_t *handle)
initialize the chip
uint8_t sgp41_get_measure_raw_without_compensation(sgp41_handle_t *handle, uint16_t *sraw_voc, uint16_t *sraw_nox)
get the measure raw result without compensation
uint8_t sgp41_humidity_convert_to_register(sgp41_handle_t *handle, float rh, uint16_t *reg)
convert the humidity to the register data
uint8_t sgp41_get_reg(sgp41_handle_t *handle, uint16_t reg, uint8_t *buf, uint16_t len)
get the chip register
uint8_t sgp41_set_reg(sgp41_handle_t *handle, uint16_t reg, uint8_t *buf, uint16_t len)
set the chip register
sgp41 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)
sgp41 information structure definition
float supply_voltage_max_v
char manufacturer_name[32]
float supply_voltage_min_v