Nol.A SDK Library 26.11.2
For IoT System Software Development
Loading...
Searching...
No Matches
CCS811Core Class Reference

Low-level CCS811 I2C register transport. The current register helpers return SENSOR_SUCCESS without validating transfers. More...

#include <SparkFun_CCS811.hpp>

Inheritance diagram for CCS811Core:
CCS811

Public Types

enum  status {
  SENSOR_SUCCESS , SENSOR_ID_ERROR , SENSOR_I2C_ERROR , SENSOR_INTERNAL_ERROR ,
  SENSOR_GENERIC_ERROR
}
 Status codes returned by register and sensor operations. More...

Public Member Functions

 CCS811Core (TwoWire &, uint8_t addr)
 Bind the I2C bus and 7-bit sensor address.
 ~CCS811Core ()=default
 Destroy the transport wrapper without taking ownership of the bus.
status beginCore (void)
 Legacy initialization declaration without an implementation; use CCS811::begin().
status readRegister (uint8_t offset, uint8_t *outputPointer)
 Read one register into outputPointer; storage must be non-null.
status multiReadRegister (uint8_t offset, uint8_t *outputPointer, uint8_t length)
status writeRegister (uint8_t offset, uint8_t dataToWrite)
 Write dataToWrite to the register at offset.
status multiWriteRegister (uint8_t offset, uint8_t *inputPointer, uint8_t length)
 Write length bytes from inputPointer starting at offset.

Protected Attributes

TwoWire & Wire
uint8_t I2CAddress

Detailed Description

Low-level CCS811 I2C register transport. The current register helpers return SENSOR_SUCCESS without validating transfers.

Member Enumeration Documentation

◆ status

Status codes returned by register and sensor operations.

Enumerator
SENSOR_GENERIC_ERROR 

Status type used by CCS811 operations; SENSOR_SUCCESS is zero.

57 {
58 SENSOR_SUCCESS,
59 SENSOR_ID_ERROR,
60 SENSOR_I2C_ERROR,
61 SENSOR_INTERNAL_ERROR,
66 }status;
status
Status codes returned by register and sensor operations.
Definition SparkFun_CCS811.hpp:57
@ SENSOR_GENERIC_ERROR
Status type used by CCS811 operations; SENSOR_SUCCESS is zero.
Definition SparkFun_CCS811.hpp:62

Member Function Documentation

◆ multiReadRegister()

status CCS811Core::multiReadRegister ( uint8_t offset,
uint8_t * outputPointer,
uint8_t length )
@brief Request four register bytes and store at most length bytes in outputPointer.

The current implementation always requests four bytes, regardless of length.


The documentation for this class was generated from the following file: