PAS CO2 Sensor  1.0.3
C++ library for Infineon Photoacoustic Spectroscopy (PAS) XENSIV™ CO2 miniaturized sensor
pas-co2-serial.hpp
Go to the documentation of this file.
1 
10 #ifndef PAS_CO2_SERIAL_HPP_
11 #define PAS_CO2_SERIAL_HPP_
12 
13 #include "pas-co2-conf.hpp"
14 
15 #if IS_INTF(PAS_CO2_INTF_SERIAL)
16 
17 #include "pas-co2-types.hpp"
18 #include "pas-co2.hpp"
19 
20 using namespace pasco2;
21 
27 class PASCO2Serial: private PASCO2
28 {
29  public:
30 
31  PASCO2Serial(pasco2::SBus * const sbus,
32  pasco2::Timer * const timer = nullptr,
33  pasco2::GPIO * const interrupt = nullptr,
34  pasco2::GPIO * const protoSelect = nullptr,
35  pasco2::GPIO * const power3V3 = nullptr,
36  pasco2::GPIO * const power12V = nullptr);
37 
38  virtual ~PASCO2Serial();
39 
40  Error_t enable ();
41  Error_t disable ();
42 
43  Error_t startMeasure(int16_t periodInSec = 0, int16_t alarmTh = 0, void (*cback) (void *) = nullptr);
44  Error_t stopMeasure ();
45 
46  Error_t getCO2 (int16_t & CO2PPM);
47 
48  Error_t getDiagnosis(Diag_t & diagnosis);
49 
50  Error_t calibrate (ABOC_t aboc, int16_t abocRef, uint16_t pressRef);
51 
52  Error_t reset ();
53 
54  Error_t getDeviceID (uint8_t & prodID, uint8_t & revID);
55 
56 };
57 
60 #endif
61 #endif
Definition: pas-co2-i2c.hpp:21
Error_t
Definition: pas-co2-types.hpp:24
Definition: pas-co2-sbus.hpp:23
ABOC_t
Definition: pas-co2-types.hpp:91
Definition: pas-co2-types.hpp:163
Definition: pas-co2-pal-gpio.hpp:25
Definition: pas-co2-pal-timer.hpp:24
Definition: pas-co2-serial.hpp:27
PAS CO2 Types.
PAS CO2 Library Configuration.
PAS CO2 Core API.
Definition: pas-co2.hpp:29