Loading...
Searching...
No Matches
sgp30.h File Reference

Detailed Description

#include "periph/i2c.h"
#include "ztimer.h"
+ Include dependency graph for sgp30.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  sgp30_data_t
 Set of measured values. More...
 
struct  sgp30_raw_data_t
 Set of measured raw values. More...
 
struct  sgp30_params_t
 Device initialization parameters. More...
 
struct  sgp30_t
 Device descriptor for the driver. More...
 

Functions

int sgp30_init (sgp30_t *dev, const sgp30_params_t *params)
 Initialize the given device.
 
int sgp30_start_air_quality (sgp30_t *dev)
 Start air quality measurements, called on sgp30_init.
 
int sgp30_read_future_set (sgp30_t *dev, uint16_t *version)
 Initialize the given device.
 
int sgp30_reset (sgp30_t *dev)
 Performs a soft reset on the device.
 
bool sgp30_ready (sgp30_t *dev)
 If device is ready to start reading measurements.
 
int sgp30_read_serial_number (sgp30_t *dev, uint8_t *buf, size_t len)
 Read the serial number from the sensor.
 
int sgp30_read_measurements (sgp30_t *dev, sgp30_data_t *data)
 Read air quality signals.
 
int sgp30_set_absolute_humidity (sgp30_t *dev, uint32_t humidity)
 Set absolute humidity value for on-chop humidity compensation.
 
int sgp30_set_baseline (sgp30_t *dev, sgp30_data_t *data)
 Set new baseline values.
 
int sgp30_get_baseline (sgp30_t *dev, sgp30_data_t *data)
 Returns baseline values.
 
int sgp30_read_raw_measurements (sgp30_t *dev, sgp30_raw_data_t *data)
 Read raw signals H2 (sout_H2) and Ethanol(sout_EthOH)