PAS CO2 Sensor  1.0.3
C++ library for Infineon Photoacoustic Spectroscopy (PAS) XENSIV™ CO2 miniaturized sensor
pas-co2-pal-uart-ino.hpp
Go to the documentation of this file.
1 
10 #ifndef PAS_CO2_PAL_UART_INO_H_
11 #define PAS_CO2_PAL_UART_INO_H_
12 
13 #include "pas-co2-conf.hpp"
14 
15 #if IS_INTF(PAS_CO2_INTF_UART)
16 
17 #include <Arduino.h>
18 #include "pas-co2-pal-uart.hpp"
19 
20 using namespace pasco2;
21 
27 class UARTPALIno : virtual public UARTPAL
28 {
29  public:
30  UARTPALIno (HardwareSerial * serial);
31  ~UARTPALIno ();
32  Error_t init ();
33  Error_t deinit ();
34  Error_t config (const uint32_t baudrate,
35  const DataBits_t dataBits,
36  const Parity_t parity,
37  const StopBits_t stopBits);
38  Error_t write (const uint8_t * data,
39  uint16_t & length);
40  Error_t read ( uint8_t * data,
41  uint16_t & length);
42  Error_t waitReceive ( uint16_t bytesRcvd,
43  uint32_t timeoutMs);
44 
45  private:
46 
47  HardwareSerial * serial;
48 
49 
50 };
51 
54 extern UARTPALIno uartpalino;
55 
56 #endif
57 #endif
StopBits_t
Definition: pas-co2-pal-uart.hpp:66
Parity_t
Definition: pas-co2-pal-uart.hpp:54
PAS CO2 UART Platform Abstraction Layer.
Definition: pas-co2-i2c.hpp:21
Error_t
Definition: pas-co2-types.hpp:24
Definition: pas-co2-pal-uart.hpp:32
DataBits_t
Definition: pas-co2-pal-uart.hpp:40
UARTPALIno uartpalino
Definition: pas-co2-pal-uart-ino.hpp:27
PAS CO2 Library Configuration.