59 uint8_t unique_serial_number[8];
170 unique_serial_number[0], unique_serial_number[1], unique_serial_number[2], unique_serial_number[3],
171 unique_serial_number[4], unique_serial_number[5], unique_serial_number[6], unique_serial_number[7]);
176 reg = rand() % 0xFFFFU;
190 reg = rand() % 0xFFFFU;
295 f = (float)(rand() % 1000) / 10.0f;
318 f = (float)(rand() % 1000) / 10.0f;
341 f = (float)(rand() % 1000) / 10.0f;
364 f = (float)(rand() % 10000);
driver stcc4 register test header file
uint8_t stcc4_humidity_convert_to_register(stcc4_handle_t *handle, float percentage, uint16_t *reg)
convert the humidity to the register raw data
uint8_t stcc4_perform_self_test(stcc4_handle_t *handle, uint16_t *result)
perform self test
uint8_t stcc4_frc_co2_convert_to_register(stcc4_handle_t *handle, float ppm, uint16_t *reg)
convert the frc co2 to the register raw data
uint8_t stcc4_pressure_convert_to_data(stcc4_handle_t *handle, uint16_t reg, float *pa)
convert the register raw data to pressure
uint8_t stcc4_set_rht_compensation(stcc4_handle_t *handle, uint16_t temperature_raw, uint16_t humidity_raw)
set rht compensation
uint8_t stcc4_exit_sleep_mode(stcc4_handle_t *handle)
exit sleep mode
uint8_t stcc4_deinit(stcc4_handle_t *handle)
close the chip
uint8_t stcc4_temperature_convert_to_register(stcc4_handle_t *handle, float deg, uint16_t *reg)
convert the temperature to the register raw data
uint8_t stcc4_perform_conditioning(stcc4_handle_t *handle)
perform conditioning
uint8_t stcc4_pressure_convert_to_register(stcc4_handle_t *handle, float pa, uint16_t *reg)
convert the pressure to the register raw data
uint8_t stcc4_frc_co2_convert_to_data(stcc4_handle_t *handle, uint16_t reg, float *ppm)
convert the register raw data to frc co2 ppm
uint8_t stcc4_set_pressure_compensation(stcc4_handle_t *handle, uint16_t pressure_raw)
set pressure compensation
uint8_t stcc4_enable_testing_mode(stcc4_handle_t *handle)
enable testing mode
uint8_t stcc4_info(stcc4_info_t *info)
get chip information
uint8_t stcc4_perform_factory_reset(stcc4_handle_t *handle)
perform factory reset
struct stcc4_handle_s stcc4_handle_t
stcc4 handle structure definition
stcc4_address_t
stcc4 address enumeration definition
uint8_t stcc4_enter_sleep_mode(stcc4_handle_t *handle)
enter sleep mode
uint8_t stcc4_perform_soft_reset(stcc4_handle_t *handle)
perform soft reset
uint8_t stcc4_init(stcc4_handle_t *handle)
initialize the chip
uint8_t stcc4_temperature_convert_to_data(stcc4_handle_t *handle, uint16_t reg, float *deg)
convert the register raw data to temperature
uint8_t stcc4_get_address_pin(stcc4_handle_t *handle, stcc4_address_t *address)
get address pin
uint8_t stcc4_set_address_pin(stcc4_handle_t *handle, stcc4_address_t address)
set address pin
uint8_t stcc4_humidity_convert_to_data(stcc4_handle_t *handle, uint16_t reg, float *percentage)
convert the register raw data to humidity
uint8_t stcc4_get_product_id(stcc4_handle_t *handle, uint32_t *product_id, uint8_t unique_serial_number[8])
get product id
uint8_t stcc4_disable_testing_mode(stcc4_handle_t *handle)
disable testing mode
uint8_t stcc4_perform_forced_recalibration(stcc4_handle_t *handle, uint16_t target_co2, uint16_t *correct_co2)
perform forced recalibration
struct stcc4_info_s stcc4_info_t
stcc4 information structure definition
uint8_t stcc4_interface_iic_write_cmd(uint8_t addr, uint8_t *buf, uint16_t len)
interface iic bus write command
void stcc4_interface_delay_ms(uint32_t ms)
interface delay ms
uint8_t stcc4_interface_iic_init(void)
interface iic bus init
uint8_t stcc4_interface_iic_deinit(void)
interface iic bus deinit
uint8_t stcc4_interface_iic_read_cmd(uint8_t addr, uint8_t *buf, uint16_t len)
interface iic bus read command
void stcc4_interface_debug_print(const char *const fmt,...)
interface print format data
#define DRIVER_STCC4_LINK_DELAY_MS(HANDLE, FUC)
link delay_ms function
#define DRIVER_STCC4_LINK_IIC_WRITE_COMMAND(HANDLE, FUC)
link iic_write_cmd function
#define DRIVER_STCC4_LINK_INIT(HANDLE, STRUCTURE)
initialize stcc4_handle_t structure
#define DRIVER_STCC4_LINK_IIC_READ_COMMAND(HANDLE, FUC)
link iic_read_cmd function
#define DRIVER_STCC4_LINK_IIC_INIT(HANDLE, FUC)
link iic_init function
#define DRIVER_STCC4_LINK_DEBUG_PRINT(HANDLE, FUC)
link debug_print function
#define DRIVER_STCC4_LINK_IIC_DEINIT(HANDLE, FUC)
link iic_deinit function
uint8_t stcc4_register_test(stcc4_address_t address)
register test
float supply_voltage_max_v
char manufacturer_name[32]
float supply_voltage_min_v