Detailed Description

#include <stdbool.h>
#include <stdint.h>
#include "periph/i2c.h"
#include "saul.h"
+ Include dependency graph for sen5x.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  sen5x_measurement_t
 Wrapper for measured values. More...
 
struct  sen5x_params_t
 Device initialization parameters. More...
 
struct  sen5x_t
 Device descriptor for the driver. More...
 

Functions

int sen5x_init (sen5x_t *dev, const sen5x_params_t *params)
 Initialize the given device. More...
 
int sen5x_reset (const sen5x_t *dev)
 Execute a reset on the given device. More...
 
void sen5x_wake (const sen5x_t *dev)
 Starts a continuous measurement. More...
 
void sen5x_wake_no_pm (const sen5x_t *dev)
 Starts a continuous measurement without PM. More...
 
void sen5x_sleep (const sen5x_t *dev)
 Stops the measurement and returns to idle mode. More...
 
void sen5x_clean_fan (const sen5x_t *dev)
 Sets the fan to maximum speed, to clean it within 10 seconds. More...
 
bool sen5x_data_ready_flag (const sen5x_t *dev)
 Sets the fan to maximum speed, to clean it within 10 seconds. More...
 
void sen5x_read_values (const sen5x_t *dev, sen5x_measurement_t *values)
 Read measured mass concentration, humidity and temperature values. More...
 
void sen5x_read_pm_values (const sen5x_t *dev, sen5x_measurement_t *values)
 Read measured particle matter values. More...
 
void sen5x_set_temperature_offset (const sen5x_t *dev, int16_t temp_offset, int16_t slope, uint16_t time_constant)
 Set a custom temperature offset to the ambient temperature. More...
 
void sen5x_get_temperature_offset (const sen5x_t *dev, int16_t *temp_offset, int16_t *slope, uint16_t *time_constant)
 Set a custom temperature offset to the ambient temperature. More...
 
void sen5x_set_warm_start (const sen5x_t *dev, uint16_t warm_start)
 Set the parameter for a warm start on the device, to improve initial accuracy of the ambient temperature output. More...
 
void sen5x_get_warm_start (const sen5x_t *dev, uint16_t *warm_start)
 Get the warm start parameter. More...
 
void sen5x_set_voc_algorithm_tuning (const sen5x_t *dev, int16_t index_offset, int16_t learning_time_offset_hours, int16_t learning_time_gain_hours, int16_t gating_max_duration_minutes, int16_t std_initial, int16_t gain_factor)
 Set the parameters for the VOC Algorithm tuning. More...
 
void sen5x_get_voc_algorithm_tuning (const sen5x_t *dev, int16_t *index_offset, int16_t *learning_time_offset_hours, int16_t *learning_time_gain_hours, int16_t *gating_max_duration_minutes, int16_t *std_initial, int16_t *gain_factor)
 Get the VOC Algorithm tuning parameters. More...
 
void sen5x_set_nox_algorithm_tuning (const sen5x_t *dev, int16_t index_offset, int16_t learning_time_offset_hours, int16_t learning_time_gain_hours, int16_t gating_max_duration_minutes, int16_t std_initial, int16_t gain_factor)
 Set the parameters for the NOx Algorithm tuning. More...
 
void sen5x_get_nox_algorithm_tuning (const sen5x_t *dev, int16_t *index_offset, int16_t *learning_time_offset_hours, int16_t *learning_time_gain_hours, int16_t *gating_max_duration_minutes, int16_t *std_initial, int16_t *gain_factor)
 Get the NOx Algorithm tuning parameters. More...
 
void sen5x_set_rht_acceleration (const sen5x_t *dev, uint16_t mode)
 Set the mode for the RH/T acceleration algorithm. More...
 
void sen5x_get_rht_acceleration (const sen5x_t *dev, uint16_t *mode)
 Get the mode for the RH/T acceleration algorithm. More...
 
void sen5x_set_voc_state (const sen5x_t *dev, const uint8_t *state, uint8_t state_size)
 Get the VOC Algorithm state. More...
 
void sen5x_get_voc_state (const sen5x_t *dev, uint8_t *state, uint8_t state_size)
 Set the VOC Algorithm state. More...