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