PAS CO2 Sensor  1.0.3
C++ library for Infineon Photoacoustic Spectroscopy (PAS) XENSIV™ CO2 miniaturized sensor
pas-co2-sbus.hpp
Go to the documentation of this file.
1 
10 #ifndef PAS_CO2_SBUS_HPP_
11 #define PAS_CO2_SBUS_HPP_
12 
13 #include "pas-co2-types.hpp"
14 
15 namespace pasco2
16 {
17 
23 class SBus
24 {
25  public:
26 
31  enum Proto_t
32  {
35  };
44  virtual Error_t init (void) = 0;
45 
52  virtual Error_t deinit (void) = 0;
53 
64  virtual Error_t write (const uint8_t regAddr,
65  const uint8_t * data,
66  uint16_t length = 1) = 0;
67 
78  virtual Error_t read (const uint8_t regAddr,
79  uint8_t * data,
80  uint16_t length = 1) = 0;
81 
88  virtual Proto_t getProtocol (void) = 0;
89 };
90 
93 }
94 
95 
96 #endif
Definition: pas-co2-sbus.hpp:33
Definition: pas-co2-i2c.hpp:21
virtual Error_t init(void)=0
Initializes the serial interface.
Error_t
Definition: pas-co2-types.hpp:24
Definition: pas-co2-sbus.hpp:23
virtual Error_t write(const uint8_t regAddr, const uint8_t *data, uint16_t length=1)=0
Writes data to a register or set of consecutive registers.
Proto_t
Definition: pas-co2-sbus.hpp:31
virtual Error_t deinit(void)=0
Deinitializes the serial interface.
virtual Proto_t getProtocol(void)=0
Gets the specific serial protocol.
virtual Error_t read(const uint8_t regAddr, uint8_t *data, uint16_t length=1)=0
Reads data from a register or set of consecutive registers.
PAS CO2 Types.
Definition: pas-co2-sbus.hpp:34