PAS CO2 Sensor  1.0.3
C++ library for Infineon Photoacoustic Spectroscopy (PAS) XENSIV™ CO2 miniaturized sensor
pas-co2-pulse.hpp
Go to the documentation of this file.
1 
10 #ifndef PAS_CO2_PULSE_HPP_
11 #define PAS_CO2_PULSE_HPP_
12 
13 #include "pas-co2-conf.hpp"
14 
15 #if IS_INTF(PAS_CO2_INTF_PULSE)
16 
17 #include "pas-co2-types.hpp"
18 #include "pas-co2.hpp"
19 
20 #undef GPIO
21 using namespace pasco2;
22 
28 class PASCO2Pulse : private PASCO2
29 {
30  public:
31 
32  PASCO2Pulse ( PWM * const pwm,
33  Timer * const timer = nullptr,
34  pasco2::GPIO * const interrupt = nullptr,
35  pasco2::GPIO * const power3V3 = nullptr,
36  pasco2::GPIO * const power12V = nullptr,
37  pasco2::GPIO * const pwmSelect = nullptr);
38 
39  virtual ~PASCO2Pulse ();
40 
41  Error_t enable ();
42  Error_t disable ();
43 
44 
45  Error_t startMeasure (void (*cback) (void *) = nullptr);
46  Error_t stopMeasure ();
47  Error_t getCO2 (int16_t & co2ppm);
48 
49  Error_t reset ();
50 };
51 
54 #endif
55 #endif
Definition: pas-co2-pal-pwm.hpp:23
Definition: pas-co2-i2c.hpp:21
Error_t
Definition: pas-co2-types.hpp:24
Definition: pas-co2-pulse.hpp:28
Definition: pas-co2-pal-gpio.hpp:25
Definition: pas-co2-pal-timer.hpp:24
PAS CO2 Types.
PAS CO2 Library Configuration.
PAS CO2 Core API.
Definition: pas-co2.hpp:29