Go to the documentation of this file.
33 #define CCS811_I2C_ADDRESS_1 (0x5A)
34 #define CCS811_I2C_ADDRESS_2 (0x5B)
41 #define CCS811_ECO2_RANGE_MIN (400)
42 #define CCS811_ECO2_RANGE_MAX (8192)
43 #define CCS811_TVOC_RANGE_MIN (0)
44 #define CCS811_TVOC_RANGE_MAX (1187)
98 #if MODULE_CCS811_FULL || DOXYGEN
168 uint16_t *iaq_tvoc, uint16_t *iaq_eco2,
169 uint16_t *raw_i, uint16_t *raw_v);
171 #if MODULE_CCS811_FULL || DOXYGEN
296 #if MODULE_CCS811_FULL || DOXYGEN
339 int16_t temp, int16_t hum);
366 uint16_t low, uint16_t high, uint8_t hyst);
@ CCS811_ERROR_NOT_SUPPORTED
function is not supported
@ CCS811_ERROR_NO_NEW_DATA
no new data (last valid data returned)
int ccs811_power_up(ccs811_t *dev)
Power up the sensor.
@ CCS811_MODE_60S
Low Power Pulse Heating, IAQ values every 60 s.
ccs811_params_t params
device initialization parameters
@ CCS811_MODE_10S
Pulse Heating mode, IAQ values every 10 s.
@ CCS811_ERROR_NO_DEV
device not available
@ CCS811_ERROR_NO_APP
could not start application
int ccs811_set_int_mode(ccs811_t *dev, ccs811_int_mode_t mode)
Enable/disable data ready or threshold interrupt signal nINT
i2c_t i2c_dev
I2C device, clock stretching required (default I2C_DEV(0))
gpio_t reset_pin
nRESET signal pin (default GPIO_UNDEF)
@ CCS811_ERROR_NO_INT_PIN
nINT signal pin not configured
ccs811_mode_t mode
measurement mode used (default CCS811_MODE_IDLE)
unsigned int i2c_t
Default i2c_t type definition.
int ccs811_read_ntc(const ccs811_t *dev, uint32_t r_ref, uint32_t *r_ntc)
Read the resistance of connected NTC thermistor.
@ CCS811_MODE_IDLE
Idle, low current mode.
@ CCS811_ERROR_I2C
I2C communication failure.
@ CCS811_ERROR_MAX_RESISTANCE
maximum sensor resistance exceeded
uint8_t i2c_addr
I2C address (default CCS811_I2C_ADDRESS_1)
@ CCS811_MODE_1S
Constant Power mode, IAQ values every 1 s.
CCS811 sensor device data structure.
int ccs811_power_down(ccs811_t *dev)
Power down the sensor.
int ccs811_get_baseline(const ccs811_t *dev, uint16_t *baseline)
Get the current baseline value from sensor.
int ccs811_init(ccs811_t *dev, const ccs811_params_t *params)
Initialize a CCS811 sensor device.
int ccs811_set_mode(ccs811_t *dev, ccs811_mode_t mode)
Set the operation mode of the sensor.
@ CCS811_ERROR_MEASMODE_INV
invalid measurement mode
int ccs811_set_baseline(const ccs811_t *dev, uint16_t baseline)
Write a previously stored baseline value to the sensor.
gpio_t int_pin
nINT signal pin (default GPIO_PIN(0, 0)
@ CCS811_ERROR_WRITE_REG_INV
invalid register address on write
int ccs811_set_environmental_data(const ccs811_t *dev, int16_t temp, int16_t hum)
Set environmental data.
@ CCS811_ERROR_HEATER_SUPPLY
heater voltage not applied correctly
@ CCS811_ERROR_HEATER_FAULT
heater current not in range
ccs811_int_mode_t int_mode
interrupt mode used (default CCS811_INT_NONE)
int ccs811_read_iaq(const ccs811_t *dev, uint16_t *iaq_tvoc, uint16_t *iaq_eco2, uint16_t *raw_i, uint16_t *raw_v)
Read IAQ sensor values and/or RAW sensor data.
gpio_t wake_pin
nWAKE signal pin (default GPIO_UNDEF)
@ CCS811_ERROR_THRESH_INV
invalid threshold parameters
@ CCS811_MODE_250MS
Constant Power mode, only RAW data every 250 ms.
@ CCS811_ERROR_NO_RESET_PIN
nRESET signal pin not configured
@ CCS811_INT_THRESHOLD
nINT signal when new data reach thresholds
Low-level GPIO peripheral driver interface definitions.
@ CCS811_INT_NONE
interrupt generation is disabled (default)
ccs811_error_codes_t
Driver error codes (returned as negative values)
int ccs811_set_eco2_thresholds(const ccs811_t *dev, uint16_t low, uint16_t high, uint8_t hyst)
Set eCO2 thresholds for threshold interrupts.
ccs811_mode_t
CCS811 operation modes.
int ccs811_data_ready(const ccs811_t *dev)
Data-ready status function.
@ CCS811_ERROR_NO_WAKE_PIN
nWAKE signal pin not configured
@ CCS811_ERROR_READ_REG_INV
invalid register address on read
@ CCS811_ERROR_NO_IAQ_DATA
IAQ data not available in this mode.
Low-level I2C peripheral driver interface definition.
CCS811 device initialization parameters.
ccs811_int_mode_t
CCS811 interrupt mode.
@ CCS811_INT_DATA_READY
nINT signal when new data are reade to read