Go to the documentation of this file.
118 #define SPS30_FAN_CLEAN_S (10U)
123 #define SPS30_SER_ART_LEN (32U)
128 #define SPS30_DEFAULT_ACI_S (604800UL)
147 #ifndef CONFIG_SPS30_ERROR_RETRY
148 #define CONFIG_SPS30_ERROR_RETRY (500U)
int sps30_read_ac_interval(const sps30_t *dev, uint32_t *seconds)
Read the fan auto-clean interval.
int sps30_reset(const sps30_t *dev)
Reset the sensor.
int sps30_stop_measurement(const sps30_t *dev)
Stops the measurement action.
float mc_pm2_5
Mass concentration of all particles <= 2.5µm [µg/m^3].
int sps30_read_measurement(const sps30_t *dev, sps30_data_t *data)
Read a set of particulate matter measurements.
bool sps30_data_ready(const sps30_t *dev, int *error)
Ask the device if a measurement is ready for reading.
unsigned int i2c_t
Default i2c_t type definition.
float nc_pm1
Number concentration of all particles <= 1µm [#/cm^3].
@ SPS30_CRC_ERROR
The CRC check of received data failed.
float mc_pm4
Mass concentration of all particles <= 4µm [µg/m^3].
int sps30_init(sps30_t *dev, const sps30_params_t *params)
Initialize SPS30 sensor driver.
float mc_pm1
Mass concentration of all particles <= 1µm [µg/m^3].
i2c_t i2c_dev
I2C dev the sensor is connected to.
sps30_error_code_t
SPS30 error codes (returned as negative values)
@ SPS30_OK
Everything went fine.
float nc_pm10
Number concentration of all particles <= 10µm [#/cm^3].
int sps30_start_fan_clean(const sps30_t *dev)
Run a fan cleaning cycle manually.
float nc_pm4
Number concentration of all particles <= 4µm [#/cm^3].
sps30_params_t p
parameters of the sensor device
int sps30_wakeup(const sps30_t *dev)
Wake up sensor from sleep mode (returns sensor to Idle mode)
int sps30_start_measurement(const sps30_t *dev)
Enable the measurement action.
int sps30_read_article_code(const sps30_t *dev, char *str, size_t len)
Read the article code from the sensor as string.
int sps30_sleep(const sps30_t *dev)
Put the sensor in sleep mode.
int sps30_read_serial_number(const sps30_t *dev, char *str, size_t len)
Read the serial number from the sensor as string.
Low-level GPIO peripheral driver interface definitions.
float mc_pm10
Mass concentration of all particles <= 10µm [µg/m^3].
float ps
Typical particle size [µm].
Set of measured particulate matter values.
float nc_pm0_5
Number concentration of all particles <= 0.5µm [#/cm^3].
float nc_pm2_5
Number concentration of all particles <= 2.5µm [#/cm^3].
int sps30_write_ac_interval(const sps30_t *dev, uint32_t seconds)
Write the fan auto-clean interval.
@ SPS30_I2C_ERROR
Some I2C operation failed.
Low-level I2C peripheral driver interface definition.