128 uint16_t temperature_raw;
129 uint16_t humidity_raw;
132 res =
scd4x_read(&gs_handle, &co2_raw, co2_ppm,
133 &temperature_raw, temperature,
134 &humidity_raw, humidity);
driver scd4x shot header file
uint8_t scd4x_wake_up(scd4x_handle_t *handle)
wake up
uint8_t scd4x_power_down(scd4x_handle_t *handle)
power down
uint8_t scd4x_measure_single_shot(scd4x_handle_t *handle)
measure single shot
uint8_t scd4x_get_data_ready_status(scd4x_handle_t *handle, scd4x_bool_t *enable)
get data ready status
uint8_t scd4x_get_serial_number(scd4x_handle_t *handle, uint16_t number[3])
get serial number
uint8_t scd4x_deinit(scd4x_handle_t *handle)
close the chip
uint8_t scd4x_read(scd4x_handle_t *handle, uint16_t *co2_raw, uint16_t *co2_ppm, uint16_t *temperature_raw, float *temperature_s, uint16_t *humidity_raw, float *humidity_s)
read data
uint8_t scd4x_set_type(scd4x_handle_t *handle, scd4x_t type)
set type
uint8_t scd4x_init(scd4x_handle_t *handle)
initialize the chip
struct scd4x_handle_s scd4x_handle_t
scd4x handle structure definition
scd4x_t
scd4x type enumeration definition
scd4x_bool_t
scd4x bool enumeration definition
uint8_t scd4x_shot_get_serial_number(uint16_t num[3])
shot example get serial number
uint8_t scd4x_shot_deinit(void)
shot example deinit
uint8_t scd4x_shot_wake_up(void)
shot wake up
uint8_t scd4x_shot_power_down(void)
shot power down
uint8_t scd4x_shot_init(scd4x_t type)
shot example init
uint8_t scd4x_shot_read(uint16_t *co2_ppm, float *temperature, float *humidity)
shot example read
uint8_t scd4x_interface_iic_init(void)
interface iic bus init
void scd4x_interface_delay_ms(uint32_t ms)
interface delay ms
uint8_t scd4x_interface_iic_deinit(void)
interface iic bus deinit
uint8_t scd4x_interface_iic_read_cmd(uint8_t addr, uint8_t *buf, uint16_t len)
interface iic bus read command
void scd4x_interface_debug_print(const char *const fmt,...)
interface print format data
uint8_t scd4x_interface_iic_write_cmd(uint8_t addr, uint8_t *buf, uint16_t len)
interface iic bus write command
#define DRIVER_SCD4X_LINK_DEBUG_PRINT(HANDLE, FUC)
link debug_print function
#define DRIVER_SCD4X_LINK_IIC_DEINIT(HANDLE, FUC)
link iic_deinit function
#define DRIVER_SCD4X_LINK_IIC_INIT(HANDLE, FUC)
link iic_init function
#define DRIVER_SCD4X_LINK_INIT(HANDLE, STRUCTURE)
initialize scd4x_handle_t structure
#define DRIVER_SCD4X_LINK_IIC_WRITE_COMMAND(HANDLE, FUC)
link iic_write_cmd function
#define DRIVER_SCD4X_LINK_DELAY_MS(HANDLE, FUC)
link delay_ms function
#define DRIVER_SCD4X_LINK_IIC_READ_COMMAND(HANDLE, FUC)
link iic_read_cmd function