128 if (
sgp30_read(&gs_handle, co2_eq_ppm, tvoc_ppb) != 0)
driver sgp30 advance header file
uint8_t sgp30_get_iaq_baseline(sgp30_handle_t *handle, uint16_t *tvoc, uint16_t *co2_eq)
get the chip iaq baseline
struct sgp30_handle_s sgp30_handle_t
sgp30 handle structure definition
uint8_t sgp30_init(sgp30_handle_t *handle)
initialize the chip
uint8_t sgp30_absolute_humidity_convert_to_register(sgp30_handle_t *handle, float temp, float rh, uint16_t *reg)
convert the absolute humidity to the register data
uint8_t sgp30_deinit(sgp30_handle_t *handle)
close the chip
uint8_t sgp30_get_serial_id(sgp30_handle_t *handle, uint16_t id[3])
get the chip serial id
uint8_t sgp30_set_iaq_baseline(sgp30_handle_t *handle, uint16_t tvoc, uint16_t co2_eq)
set the chip iaq baseline
uint8_t sgp30_set_absolute_humidity(sgp30_handle_t *handle, uint16_t humidity)
set the chip absolute_humidity
uint8_t sgp30_read(sgp30_handle_t *handle, uint16_t *co2_eq_ppm, uint16_t *tvoc_ppb)
read the iaq measure result
uint8_t sgp30_get_feature_set(sgp30_handle_t *handle, uint8_t *product_type, uint8_t *product_version)
get the chip feature
uint8_t sgp30_soft_reset(sgp30_handle_t *handle)
soft reset the chip
uint8_t sgp30_iaq_init(sgp30_handle_t *handle)
initialize the chip iaq
uint8_t sgp30_advance_get_serial_id(uint16_t id[3])
advance example get the serial id
uint8_t sgp30_advance_get_feature(uint8_t *product_type, uint8_t *product_version)
advance example get the chip feature
uint8_t sgp30_advance_set_absolute_humidity(float temp, float rh)
advance example set the absolute humidity
uint8_t sgp30_advance_set_iaq_baseline(uint16_t tvoc, uint16_t co2_eq)
advance example set the chip iaq baseline
uint8_t sgp30_advance_init(void)
advance example init
uint8_t sgp30_advance_deinit(void)
advance example deinit
uint8_t sgp30_advance_read(uint16_t *co2_eq_ppm, uint16_t *tvoc_ppb)
advance example read
uint8_t sgp30_advance_get_iaq_baseline(uint16_t *tvoc, uint16_t *co2_eq)
advance example get the chip iaq baseline
uint8_t sgp30_interface_iic_write_cmd(uint8_t addr, uint8_t *buf, uint16_t len)
interface iic bus write command
uint8_t sgp30_interface_iic_init(void)
interface iic bus init
uint8_t sgp30_interface_iic_read_cmd(uint8_t addr, uint8_t *buf, uint16_t len)
interface iic bus read command
void sgp30_interface_delay_ms(uint32_t ms)
interface delay ms
void sgp30_interface_debug_print(const char *const fmt,...)
interface print format data
uint8_t sgp30_interface_iic_deinit(void)
interface iic bus deinit
#define DRIVER_SGP30_LINK_DEBUG_PRINT(HANDLE, FUC)
link debug_print function
#define DRIVER_SGP30_LINK_INIT(HANDLE, STRUCTURE)
initialize sgp30_handle_t structure
#define DRIVER_SGP30_LINK_IIC_WRITE_COMMAND(HANDLE, FUC)
link iic_write_cmd function
#define DRIVER_SGP30_LINK_IIC_INIT(HANDLE, FUC)
link iic_init function
#define DRIVER_SGP30_LINK_DELAY_MS(HANDLE, FUC)
link delay_ms function
#define DRIVER_SGP30_LINK_IIC_DEINIT(HANDLE, FUC)
link iic_deinit function
#define DRIVER_SGP30_LINK_IIC_READ_COMMAND(HANDLE, FUC)
link iic_read_cmd function