PAS CO2 Sensor  1.0.3
C++ library for Infineon Photoacoustic Spectroscopy (PAS) XENSIV™ CO2 miniaturized sensor
pasco2::Reg Class Reference

#include <pas-co2-reg.hpp>

Public Types

Register Addresses
enum  Addr_t {
  REG_ADDR_PROD_ID = (0x00U), REG_ADDR_SENS_STS = (0x01U), REG_ADDR_MEAS_RATE_H = (0x02U), REG_ADDR_MEAS_RATE_L = (0x03U),
  REG_ADDR_MEAS_CFG = (0x04U), REG_ADDR_CO2PPM_H = (0x05U), REG_ADDR_CO2PPM_L = (0x06U), REG_ADDR_MEAS_STS = (0x07U),
  REG_ADDR_INT_CFG = (0x08U), REG_ADDR_ALARM_TH_H = (0x09U), REG_ADDR_ALARM_TH_L = (0x0AU), REG_ADDR_PRESS_REF_H = (0x0BU),
  REG_ADDR_PRESS_REF_L = (0x0CU), REG_ADDR_CALIB_REF_H = (0x0DU), REG_ADDR_CALIB_REF_L = (0x0EU), REG_ADDR_SCRATCH_PAD = (0x0FU),
  REG_ADDR_SENS_RST = (0x10U)
}
 

Public Member Functions

 Reg ()
 
 ~Reg ()
 
uint8_t getProductID (void)
 
uint8_t getRevisionID (void)
 
bool isSensorReady (void)
 
bool isPWMPinEnabled (void)
 
bool isTempOutofRange (void)
 
void clearTempOutofRangeFlag (void)
 
bool is12VOutofRange (void)
 
void clear12VOutofRangeFlag (void)
 
bool hasCommErrorOccurred (void)
 
void clearCommErrorFlag (void)
 
int16_t getMeasRate (void)
 
void setMeasRate (const int16_t period)
 
void enablePWMOutput (void)
 
void disablePWMOutput (void)
 
bool isPWMOutputEnabled (void)
 
PWMMode_t getPWMMode (void)
 
void setPWMMode (const PWMMode_t mode)
 
ABOC_t getABOCMode (void)
 
void setABOCMode (const ABOC_t abocMode)
 
void setOperationMode (const OpMode_t mode)
 
OpMode_t getOperationMode (void)
 
uint16_t getCO2PPM (void)
 
bool isDataReady (void)
 
bool hasInterruptOcurred (void)
 
void clearInterruptFlag (void)
 
bool isAlarmSet (void)
 
void clearAlarmFlag (void)
 
IntIOConf_t getInterruptIOConf (void)
 
void setInterruptIOConf (const IntIOConf_t ioConf)
 
Int_t getInterruptFunc (void)
 
void setInterrutFunc (const Int_t func)
 
Alarm_t getAlarmType (void)
 
void setAlarmType (const Alarm_t func)
 
int16_t getAlarmThreshold (void)
 
void setAlarmThreshold (const int16_t alarmTh)
 
uint16_t getPressCompReference (void)
 
void setPressCompReference (const uint16_t pressRef)
 
int16_t getABOCReference (void)
 
void setABOCReference (const int16_t abocRef)
 
uint8_t getScratchPad (void)
 
void setStratchPad (const uint8_t value)
 
void setSoftReset (void)
 

Public Attributes

uint8_t regMap [regCount]
 

Static Public Attributes

static const uint8_t regCount = 0x11U
 

Member Enumeration Documentation

◆ Addr_t

Enumerator
REG_ADDR_PROD_ID 

Product and revision ID register address

REG_ADDR_SENS_STS 

Sensor status register address

REG_ADDR_MEAS_RATE_H 

Measurement period MSB configuration register address

REG_ADDR_MEAS_RATE_L 

Measurement period LSB register address

REG_ADDR_MEAS_CFG 

Measurement mode configuration register address

REG_ADDR_CO2PPM_H 

CO2 concentration result MSB register address

REG_ADDR_CO2PPM_L 

CO2 concentration result LSB register address

REG_ADDR_MEAS_STS 

Measurement status register address

REG_ADDR_INT_CFG 

Interrupt pin configuration register address

REG_ADDR_ALARM_TH_H 

Alarm threshold MSB register address

REG_ADDR_ALARM_TH_L 

Alarm threshold LSB register address

REG_ADDR_PRESS_REF_H 

Pressure compensation MSB register address

REG_ADDR_PRESS_REF_L 

Pressure compensation LSB register address

REG_ADDR_CALIB_REF_H 

Automatic baseline offset MSB register address

REG_ADDR_CALIB_REF_L 

Automatic baseline offset LSB register address

REG_ADDR_SCRATCH_PAD 

Scratch pad register address

REG_ADDR_SENS_RST 

Soft reset register address

Constructor & Destructor Documentation

◆ Reg()

Reg::Reg ( )

◆ ~Reg()

Reg::~Reg ( )

Member Function Documentation

◆ getProductID()

uint8_t Reg::getProductID ( void  )

◆ getRevisionID()

uint8_t Reg::getRevisionID ( void  )

◆ isSensorReady()

bool Reg::isSensorReady ( void  )

◆ isPWMPinEnabled()

bool Reg::isPWMPinEnabled ( void  )

◆ isTempOutofRange()

bool Reg::isTempOutofRange ( void  )

◆ clearTempOutofRangeFlag()

void Reg::clearTempOutofRangeFlag ( void  )

◆ is12VOutofRange()

bool Reg::is12VOutofRange ( void  )

◆ clear12VOutofRangeFlag()

void Reg::clear12VOutofRangeFlag ( void  )

◆ hasCommErrorOccurred()

bool Reg::hasCommErrorOccurred ( void  )

◆ clearCommErrorFlag()

void Reg::clearCommErrorFlag ( void  )

◆ getMeasRate()

int16_t Reg::getMeasRate ( void  )

◆ setMeasRate()

void Reg::setMeasRate ( const int16_t  period)

◆ enablePWMOutput()

void Reg::enablePWMOutput ( void  )

◆ disablePWMOutput()

void Reg::disablePWMOutput ( void  )

◆ isPWMOutputEnabled()

bool Reg::isPWMOutputEnabled ( void  )

◆ getPWMMode()

PWMMode_t Reg::getPWMMode ( void  )

◆ setPWMMode()

void Reg::setPWMMode ( const PWMMode_t  mode)

◆ getABOCMode()

ABOC_t Reg::getABOCMode ( void  )

◆ setABOCMode()

void Reg::setABOCMode ( const ABOC_t  abocMode)

◆ setOperationMode()

void Reg::setOperationMode ( const OpMode_t  mode)

◆ getOperationMode()

OpMode_t Reg::getOperationMode ( void  )

◆ getCO2PPM()

uint16_t Reg::getCO2PPM ( void  )

◆ isDataReady()

bool Reg::isDataReady ( void  )

◆ hasInterruptOcurred()

bool Reg::hasInterruptOcurred ( void  )

◆ clearInterruptFlag()

void Reg::clearInterruptFlag ( void  )

◆ isAlarmSet()

bool Reg::isAlarmSet ( void  )

◆ clearAlarmFlag()

void Reg::clearAlarmFlag ( void  )

◆ getInterruptIOConf()

IntIOConf_t Reg::getInterruptIOConf ( void  )

◆ setInterruptIOConf()

void Reg::setInterruptIOConf ( const IntIOConf_t  ioConf)

◆ getInterruptFunc()

Int_t Reg::getInterruptFunc ( void  )

◆ setInterrutFunc()

void Reg::setInterrutFunc ( const Int_t  func)

◆ getAlarmType()

Alarm_t Reg::getAlarmType ( void  )

◆ setAlarmType()

void Reg::setAlarmType ( const Alarm_t  func)

◆ getAlarmThreshold()

int16_t Reg::getAlarmThreshold ( void  )

◆ setAlarmThreshold()

void Reg::setAlarmThreshold ( const int16_t  alarmTh)

◆ getPressCompReference()

uint16_t Reg::getPressCompReference ( void  )

◆ setPressCompReference()

void Reg::setPressCompReference ( const uint16_t  pressRef)

◆ getABOCReference()

int16_t Reg::getABOCReference ( void  )

◆ setABOCReference()

void Reg::setABOCReference ( const int16_t  abocRef)

◆ getScratchPad()

uint8_t Reg::getScratchPad ( void  )

◆ setStratchPad()

void Reg::setStratchPad ( const uint8_t  value)

◆ setSoftReset()

void Reg::setSoftReset ( void  )

Member Data Documentation

◆ regCount

const uint8_t pasco2::Reg::regCount = 0x11U
static

Number of registers

◆ regMap

uint8_t pasco2::Reg::regMap[regCount]

Register map


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