PAS CO2 Sensor  1.0.3
C++ library for Infineon Photoacoustic Spectroscopy (PAS) XENSIV™ CO2 miniaturized sensor
pas-co2-pal-gpio.hpp
Go to the documentation of this file.
1 
10 #ifndef PAS_CO2_PAL_GPIO_HPP_
11 #define PAS_CO2_PAL_GPIO_HPP_
12 
13 #include "pas-co2-types.hpp"
14 
15 #undef GPIO /* Avoid ambiguous definition with C macros */
16 
17 namespace pasco2
18 {
19 
25 class GPIO
26 {
27  public:
28 
34  {
37  };
44  enum VLevel_t
45  {
46  GPIO_LOW = 0,
47  GPIO_HIGH = 1
48  };
55  enum VLogic_t
56  {
57  NEGATIVE = 1,
58  POSITIVE = 2,
59  };
68  virtual Error_t init () = 0;
69 
76  virtual Error_t deinit () = 0;
77 
85  virtual Error_t enableInt (void (*cback) (void *)) = 0;
86 
93  virtual Error_t disableInt () = 0;
94 
101  virtual IntEvent_t intEvent () = 0;
102 
109  virtual VLevel_t read () = 0;
110 
118  virtual Error_t write (VLevel_t level) = 0;
119 
128  virtual Error_t enable () = 0;
129 
138  virtual Error_t disable () = 0;
139 };
140 
143 }
144 
145 #endif
virtual Error_t deinit()=0
Deinitializes the GPIO.
virtual Error_t disableInt()=0
Disables the GPIO hardware interrupt.
Definition: pas-co2-pal-gpio.hpp:46
Definition: pas-co2-pal-gpio.hpp:36
Definition: pas-co2-pal-gpio.hpp:57
virtual Error_t enableInt(void(*cback)(void *))=0
Enables the GPIO hardware interrupt.
Definition: pas-co2-pal-gpio.hpp:58
Definition: pas-co2-i2c.hpp:21
virtual Error_t init()=0
Initializes the GPIO.
virtual Error_t disable()=0
Disables the GPIO output according to the GPIO logic.
virtual Error_t enable()=0
Enables the GPIO output according to the GPIO logic.
Error_t
Definition: pas-co2-types.hpp:24
VLogic_t
Definition: pas-co2-pal-gpio.hpp:55
virtual VLevel_t read()=0
Reads the GPIO voltage level.
IntEvent_t
Definition: pas-co2-pal-gpio.hpp:33
virtual Error_t write(VLevel_t level)=0
Writes the GPIO output voltage level.
VLevel_t
Definition: pas-co2-pal-gpio.hpp:44
Definition: pas-co2-pal-gpio.hpp:25
virtual IntEvent_t intEvent()=0
Gets the latest interrupt event.
PAS CO2 Types.
Definition: pas-co2-pal-gpio.hpp:35
Definition: pas-co2-pal-gpio.hpp:47