107 uint16_t temperature_raw;
108 uint16_t humidity_raw;
111 res =
scd4x_read(&gs_handle, &co2_raw, co2_ppm,
112 &temperature_raw, temperature,
113 &humidity_raw, humidity);
driver scd4x basic 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_stop_periodic_measurement(scd4x_handle_t *handle)
stop periodic measurement
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
uint8_t scd4x_start_periodic_measurement(scd4x_handle_t *handle)
start periodic measurement
struct scd4x_handle_s scd4x_handle_t
scd4x handle structure definition
scd4x_t
scd4x type enumeration definition
uint8_t scd4x_basic_get_serial_number(uint16_t num[3])
basic example get serial number
uint8_t scd4x_basic_wake_up(void)
basic wake up
uint8_t scd4x_basic_deinit(void)
basic example deinit
uint8_t scd4x_basic_power_down(void)
basic power down
uint8_t scd4x_basic_read(uint16_t *co2_ppm, float *temperature, float *humidity)
basic example read
uint8_t scd4x_basic_init(scd4x_t type)
basic example init
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