255#define DRIVER_SEN5X_LINK_INIT(HANDLE, STRUCTURE) memset(HANDLE, 0, sizeof(STRUCTURE))
263#define DRIVER_SEN5X_LINK_IIC_INIT(HANDLE, FUC) (HANDLE)->iic_init = FUC
271#define DRIVER_SEN5X_LINK_IIC_DEINIT(HANDLE, FUC) (HANDLE)->iic_deinit = FUC
279#define DRIVER_SEN5X_LINK_IIC_WRITE_COMMAND(HANDLE, FUC) (HANDLE)->iic_write_cmd = FUC
287#define DRIVER_SEN5X_LINK_IIC_READ_COMMAND(HANDLE, FUC) (HANDLE)->iic_read_cmd = FUC
295#define DRIVER_SEN5X_LINK_DELAY_MS(HANDLE, FUC) (HANDLE)->delay_ms = FUC
303#define DRIVER_SEN5X_LINK_DEBUG_PRINT(HANDLE, FUC) (HANDLE)->debug_print = FUC
507 int16_t normalized_temperature_offset_slope,
508 uint16_t time_constant);
524 int16_t *normalized_temperature_offset_slope,
525 uint16_t *time_constant);
543 float temperature_offset_degree,
544 float normalized_temperature_offset_slope_factor,
545 float time_constant_second,
546 int16_t *temperature_offset_reg,
547 int16_t *normalized_temperature_offset_slope_reg,
548 uint16_t *time_constant_reg);
566 int16_t temperature_offset_reg,
567 int16_t normalized_temperature_offset_slope_reg,
568 uint16_t time_constant_reg,
569 float *temperature_offset_degree,
570 float *normalized_temperature_offset_slope_factor,
571 float *time_constant_second);
622 int16_t learning_time_offset_hour,
623 int16_t learning_time_gain_hour,
624 int16_t gating_max_duration_minute,
626 int16_t gain_factor);
645 int16_t *learning_time_offset_hour,
646 int16_t *learning_time_gain_hour,
647 int16_t *gating_max_duration_minute,
648 int16_t *std_initial,
649 int16_t *gain_factor);
674 int16_t learning_time_offset_hour,
675 int16_t learning_time_gain_hour,
676 int16_t gating_max_duration_minute,
678 int16_t gain_factor);
697 int16_t *learning_time_offset_hour,
698 int16_t *learning_time_gain_hour,
699 int16_t *gating_max_duration_minute,
700 int16_t *std_initial,
701 int16_t *gain_factor);
uint8_t sen5x_set_nox_algorithm_tuning(sen5x_handle_t *handle, int16_t index_offset, int16_t learning_time_offset_hour, int16_t learning_time_gain_hour, int16_t gating_max_duration_minute, int16_t std_initial, int16_t gain_factor)
set nox algorithm tuning
uint8_t sen5x_temperature_compensation_convert_to_register(sen5x_handle_t *handle, float temperature_offset_degree, float normalized_temperature_offset_slope_factor, float time_constant_second, int16_t *temperature_offset_reg, int16_t *normalized_temperature_offset_slope_reg, uint16_t *time_constant_reg)
convert the temperature compensation to the register raw data
struct sen50_data_s sen50_data_t
sen50 data structure definition
uint8_t sen5x_info(sen5x_info_t *info)
get chip information
uint8_t sen5x_set_voc_algorithm_state(sen5x_handle_t *handle, uint16_t state[4])
set voc algorithm state
uint8_t sen5x_get_temperature_compensation(sen5x_handle_t *handle, int16_t *temperature_offset, int16_t *normalized_temperature_offset_slope, uint16_t *time_constant)
get temperature compensation
uint8_t sen5x_read_pm_value(sen5x_handle_t *handle, sen5x_pm_t *pm)
read the pm value
uint8_t sen5x_set_temperature_compensation(sen5x_handle_t *handle, int16_t temperature_offset, int16_t normalized_temperature_offset_slope, uint16_t time_constant)
set temperature compensation
uint8_t sen5x_get_warm_start(sen5x_handle_t *handle, uint16_t *param)
get warm start
uint8_t sen5x_read_raw_value(sen5x_handle_t *handle, sen5x_raw_t *raw)
read raw value
uint8_t sen55_read(sen5x_handle_t *handle, sen55_data_t *output)
read the result
uint8_t sen5x_set_type(sen5x_handle_t *handle, sen5x_type_t type)
set the chip type
sen5x_status_t
sen5x status enumeration definition
uint8_t sen54_read(sen5x_handle_t *handle, sen54_data_t *output)
read the result
uint8_t sen5x_read_data_flag(sen5x_handle_t *handle, sen5x_data_ready_flag_t *flag)
read the data flag
uint8_t sen5x_start_measurement_without_pm(sen5x_handle_t *handle)
start the measurement without pm
uint8_t sen5x_get_device_status(sen5x_handle_t *handle, uint32_t *status)
get the device status
uint8_t sen5x_start_fan_cleaning(sen5x_handle_t *handle)
start the fan cleaning
uint8_t sen5x_get_version(sen5x_handle_t *handle, uint8_t *version)
get the version
uint8_t sen5x_start_measurement(sen5x_handle_t *handle)
start the measurement
uint8_t sen5x_get_nox_algorithm_tuning(sen5x_handle_t *handle, int16_t *index_offset, int16_t *learning_time_offset_hour, int16_t *learning_time_gain_hour, int16_t *gating_max_duration_minute, int16_t *std_initial, int16_t *gain_factor)
get nox algorithm tuning
uint8_t sen5x_get_type(sen5x_handle_t *handle, sen5x_type_t *type)
get the chip type
uint8_t sen50_read(sen5x_handle_t *handle, sen50_data_t *output)
read the result
sen5x_data_ready_flag_t
sen5x data ready flag enumeration definition
uint8_t sen5x_reset(sen5x_handle_t *handle)
reset the chip
uint8_t sen5x_get_rht_acceleration_mode(sen5x_handle_t *handle, sen5x_rht_acceleration_mode_t *mode)
get rht acceleration mode
sen5x_type_t
sen5x type enumeration definition
uint8_t sen5x_deinit(sen5x_handle_t *handle)
close the chip
uint8_t sen5x_get_serial_number(sen5x_handle_t *handle, char sn[32])
get the serial number
struct sen5x_handle_s sen5x_handle_t
sen5x handle structure definition
uint8_t sen5x_get_product_name(sen5x_handle_t *handle, char name[32])
get the product name
uint8_t sen5x_get_voc_algorithm_tuning(sen5x_handle_t *handle, int16_t *index_offset, int16_t *learning_time_offset_hour, int16_t *learning_time_gain_hour, int16_t *gating_max_duration_minute, int16_t *std_initial, int16_t *gain_factor)
get voc algorithm tuning
uint8_t sen5x_clear_device_status(sen5x_handle_t *handle)
clear the device status
uint8_t sen5x_set_voc_algorithm_tuning(sen5x_handle_t *handle, int16_t index_offset, int16_t learning_time_offset_hour, int16_t learning_time_gain_hour, int16_t gating_max_duration_minute, int16_t std_initial, int16_t gain_factor)
set voc algorithm tuning
uint8_t sen5x_get_auto_cleaning_interval(sen5x_handle_t *handle, uint32_t *second)
get the auto cleaning interval
struct sen55_data_s sen55_data_t
sen55 data structure definition
struct sen5x_raw_s sen5x_raw_t
sen5x raw structure definition
struct sen54_data_s sen54_data_t
sen54 data structure definition
struct sen5x_pm_s sen5x_pm_t
sen5x pm structure definition
uint8_t sen5x_temperature_compensation_convert_to_data(sen5x_handle_t *handle, int16_t temperature_offset_reg, int16_t normalized_temperature_offset_slope_reg, uint16_t time_constant_reg, float *temperature_offset_degree, float *normalized_temperature_offset_slope_factor, float *time_constant_second)
convert the temperature compensation to the real data
uint8_t sen5x_disable_auto_cleaning_interval(sen5x_handle_t *handle)
disable the auto cleaning interval
uint8_t sen5x_set_rht_acceleration_mode(sen5x_handle_t *handle, sen5x_rht_acceleration_mode_t mode)
set rht acceleration mode
struct sen5x_info_s sen5x_info_t
sen5x information structure definition
uint8_t sen5x_init(sen5x_handle_t *handle)
initialize the chip
uint8_t sen5x_set_warm_start(sen5x_handle_t *handle, uint16_t param)
set warm start
uint8_t sen5x_set_auto_cleaning_interval(sen5x_handle_t *handle, uint32_t second)
set the auto cleaning interval
uint8_t sen5x_stop_measurement(sen5x_handle_t *handle)
stop the measurement
sen5x_rht_acceleration_mode_t
sen5x rht acceleration mode enumeration definition
uint8_t sen5x_get_voc_algorithm_state(sen5x_handle_t *handle, uint16_t state[4])
get voc algorithm state
@ SEN5X_STATUS_FAN_SPEED_ERROR
@ SEN5X_STATUS_FAN_CLEANING_ACTIVE
@ SEN5X_STATUS_LASER_ERROR
@ SEN5X_DATA_READY_FLAG_NOT_READY
@ SEN5X_DATA_READY_FLAG_AVAILABLE
@ SEN5X_RHT_ACCELERATION_MEDIUM
@ SEN5X_RHT_ACCELERATION_HIGH
@ SEN5X_RHT_ACCELERATION_LOW
uint8_t sen5x_set_reg(sen5x_handle_t *handle, uint16_t reg, uint8_t *buf, uint16_t len)
set the chip register
uint8_t sen5x_get_reg(sen5x_handle_t *handle, uint16_t reg, uint8_t *buf, uint16_t len)
get the chip register
sen50 data structure definition
sen54 data structure definition
float compensated_ambient_temperature_degree
int16_t compensated_ambient_temperature_raw
int16_t compensated_ambient_humidity_raw
float compensated_ambient_humidity_percentage
sen55 data structure definition
float compensated_ambient_temperature_degree
int16_t compensated_ambient_temperature_raw
int16_t compensated_ambient_humidity_raw
float compensated_ambient_humidity_percentage
sen5x handle structure definition
void(* delay_ms)(uint32_t ms)
void(* debug_print)(const char *const fmt,...)
uint8_t(* iic_init)(void)
uint8_t(* iic_read_cmd)(uint8_t addr, uint8_t *buf, uint16_t len)
uint8_t(* iic_deinit)(void)
uint8_t(* iic_write_cmd)(uint8_t addr, uint8_t *buf, uint16_t len)
sen5x information structure definition
float supply_voltage_max_v
char manufacturer_name[32]
float supply_voltage_min_v
sen5x pm structure definition
uint16_t mass_concentration_pm4p0_raw
uint16_t number_concentration_pm10_raw
float typical_particle_um
uint16_t number_concentration_pm0p5_raw
uint16_t number_concentration_pm1p0_raw
uint16_t mass_concentration_pm2p5_raw
uint16_t mass_concentration_pm1p0_raw
uint16_t number_concentration_pm4p0_raw
uint16_t number_concentration_pm2p5_raw
uint16_t mass_concentration_pm10_raw
uint16_t typical_particle_raw
sen5x raw structure definition
float humidity_percentage