121uint8_t
sgp41_basic_read(
float temperature,
float humidity, int32_t *voc_gas_index, int32_t *nox_gas_index)
124 uint16_t raw_humidity;
125 uint16_t raw_temperature;
driver sgp41 algorithm header file
driver sgp41 basic header file
void sgp41_algorithm_process(sgp41_gas_index_algorithm_t *params, int32_t sraw, int32_t *gas_index)
algorithm process
struct sgp41_gas_index_algorithm_s sgp41_gas_index_algorithm_t
sgp41 gas index algorithm structure definition
void sgp41_algorithm_init(sgp41_gas_index_algorithm_t *params, int32_t algorithm_type)
algorithm init
#define SGP41_ALGORITHM_TYPE_VOC
sgp41 algorithm type definition
#define SGP41_ALGORITHM_TYPE_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_deinit(sgp41_handle_t *handle)
close the chip
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_basic_read_without_compensation(int32_t *voc_gas_index, int32_t *nox_gas_index)
basic example read without compensation
uint8_t sgp41_basic_read(float temperature, float humidity, int32_t *voc_gas_index, int32_t *nox_gas_index)
basic example read
uint8_t sgp41_basic_get_serial_id(uint16_t id[3])
basic example get serial id
uint8_t sgp41_basic_init(void)
basic example init
uint8_t sgp41_basic_deinit(void)
basic example deinit
uint8_t sgp41_interface_iic_read_cmd(uint8_t addr, uint8_t *buf, uint16_t len)
interface iic bus read command
void sgp41_interface_debug_print(const char *const fmt,...)
interface print format data
uint8_t sgp41_interface_iic_write_cmd(uint8_t addr, uint8_t *buf, uint16_t len)
interface iic bus write command
void sgp41_interface_delay_ms(uint32_t ms)
interface delay ms
uint8_t sgp41_interface_iic_deinit(void)
interface iic bus deinit
uint8_t sgp41_interface_iic_init(void)
interface iic bus init
#define DRIVER_SGP41_LINK_DELAY_MS(HANDLE, FUC)
link delay_ms function
#define DRIVER_SGP41_LINK_IIC_READ_COMMAND(HANDLE, FUC)
link iic_read_cmd function
#define DRIVER_SGP41_LINK_INIT(HANDLE, STRUCTURE)
initialize sgp41_handle_t structure
#define DRIVER_SGP41_LINK_IIC_INIT(HANDLE, FUC)
link iic_init function
#define DRIVER_SGP41_LINK_DEBUG_PRINT(HANDLE, FUC)
link debug_print function
#define DRIVER_SGP41_LINK_IIC_WRITE_COMMAND(HANDLE, FUC)
link iic_write_cmd function
#define DRIVER_SGP41_LINK_IIC_DEINIT(HANDLE, FUC)
link iic_deinit function