PAS CO2 Sensor  1.0.3
C++ library for Infineon Photoacoustic Spectroscopy (PAS) XENSIV™ CO2 miniaturized sensor
pas-co2-pal-i2c-ino.hpp
Go to the documentation of this file.
1 
10 #ifndef PAS_CO2_PAL_I2C_INO_H_
11 #define PAS_CO2_PAL_I2C_INO_H_
12 
13 #include "pas-co2-conf.hpp"
14 
15 #if IS_INTF(PAS_CO2_INTF_I2C)
16 
17 #include <Wire.h>
18 #include "pas-co2-pal-i2c.hpp"
19 
20 using namespace pasco2;
21 
27 class I2CPALIno : virtual public I2CPAL
28 {
29  public:
30  I2CPALIno (TwoWire * wire = &Wire);
31  ~I2CPALIno ();
32  Error_t init ();
33  Error_t deinit ();
34  Error_t setClockFreq (const uint32_t clockHz);
35  Error_t read (const uint8_t slave7BAddr, const uint8_t memAddr, uint8_t * data, uint16_t & length);
36  Error_t write (const uint8_t slave7BAddr, const uint8_t memAddr, const uint8_t * data, uint16_t & length);
37 
38  private:
39 
40  TwoWire * wire;
41 
42  static const uint8_t maxRequestFromBytes = 255; /* Maximum read bytes allowed by requestFrom() Wire "read function. */
43 
44 };
45 
48 extern I2CPALIno i2cpalino;
49 
50 #endif
51 #endif
PAS CO2 I2C Platform Abstraction Layer.
I2CPALIno i2cpalino
Library I2C instance.
Definition: pas-co2-pal-i2c-ino.cpp:289
Definition: pas-co2-i2c.hpp:21
Error_t
Definition: pas-co2-types.hpp:24
Definition: pas-co2-pal-i2c.hpp:28
Definition: pas-co2-pal-i2c-ino.hpp:27
PAS CO2 Library Configuration.