128 if (
sgp30_read(&gs_handle, co2_eq_ppm, tvoc_ppb) != 0)
driver sgp30 basic header file
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_deinit(sgp30_handle_t *handle)
close the chip
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_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_basic_init(void)
basic example init
uint8_t sgp30_basic_deinit(void)
basic example deinit
uint8_t sgp30_basic_read(uint16_t *co2_eq_ppm, uint16_t *tvoc_ppb)
basic example read
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