EFR32 Mighty Gecko 1 Software Documentation  efr32mg1-doc-5.1.2
ccs811.c File Reference

Detailed Description

Driver for the Cambridge CMOS Sensors CCS811 gas and indoor air quality sensor.

Version
5.1.1

License

Copyright 2016 Silicon Laboratories, Inc. http://www.silabs.com

This file is licensed under the Silicon Labs License Agreement. See the file "Silabs_License_Agreement.txt" for details. Before using this software for any purpose, you must agree to the terms of that agreement.

Definition in file ccs811.c.

#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include "i2cspm.h"
#include "thunderboard/board.h"
#include "thunderboard/ccs811.h"
#include "thunderboard/util.h"
#include "thunderboard/rfs/rfs.h"

Go to the source code of this file.

Functions

uint32_t CCS811_deInit (void)
 De-initializes the chip. More...
 
void CCS811_dumpRegisters (void)
 Dumps the registers of the CSS811. More...
 
uint32_t CCS811_getHardwareID (uint8_t *hardwareID)
 Reads Hardware ID from the CSS811 sensor. More...
 
uint32_t CCS811_getMeasurement (uint16_t *eco2, uint16_t *tvoc)
 Reads measurement data (eCO2 and TVOC) from the CSS811 sensor. More...
 
uint32_t CCS811_getRawData (uint16_t *current, uint16_t *rawData)
 Gets the latest readings from the sense resistor of the CSS811 sensor. More...
 
uint32_t CCS811_getStatus (uint8_t *status)
 Reads the status of the CSS811 sensor. More...
 
uint32_t CCS811_init (void)
 Initializes the chip and performs firmware upgrade if required. More...
 
bool CCS811_isDataAvailable (void)
 Checks if new measurement data available. More...
 
uint32_t CCS811_readMailbox (uint8_t id, uint8_t length, uint8_t *data)
 Reads data from a specific Mailbox address. More...
 
uint32_t CCS811_setEnvData (int32_t tempData, uint32_t rhData)
 Writes temperature and humidity values to the environmental data regs. More...
 
uint32_t CCS811_setMeasureMode (uint8_t measMode)
 Sets the measurement mode of the CSS811 sensor. More...
 
uint32_t CCS811_softwareReset (void)
 Performs software reset on the CCS811. More...
 
uint32_t CCS811_startApplication (void)
 Switches the CSS811 chip from boot to application mode. More...