Demo HCI Implementation for WiMOD-LR Devices  V2.0.3
WimodHwInterfaceWrapper.h
Go to the documentation of this file.
1 /*
2  * WimodHwInterfaceWrapper.h
3  *
4  * Created on: Mar 5, 2019
5  */
6 
7 //------------------------------------------------------------------------------
37 //------------------------------------------------------------------------------
38 
39 
40 #ifndef ARDUINO_UTILS_WIMODHWINTERFACEWRAPPER_H_
41 #define ARDUINO_UTILS_WIMODHWINTERFACEWRAPPER_H_
42 
43 //------------------------------------------------------------------------------
44 //
45 // Section Includes Files
46 //
47 //------------------------------------------------------------------------------
48 #include <stdint.h>
49 #include <stdbool.h>
50 
51 
52 #if __has_include("Arduino.h")
53 #include <Arduino.h>
54 
55 class WimodHwInterfaceWrapper {
56  public:
57  WimodHwInterfaceWrapper(Stream& s);
58  void txByte(uint8_t tx);
59  int rxBytesAvailable(void);
60  uint8_t getNextRxByte(void);
61 
62 
63  private:
64  Stream& serial;
65 };
66 
67 #endif
68 
69 #if __has_include("mbed.h")
70 #include <mbed.h>
71 #include "SerialBuffer.h"
72 
73 class WimodHwInterfaceWrapper {
74  public:
75  WimodHwInterfaceWrapper(mbed::Serial& s);
76  void txByte(uint8_t tx);
77  int rxBytesAvailable(void);
78  uint8_t getNextRxByte(void);
79 
80  void _rxCallback(void);
81  private:
82  mbed::Serial& serial;
83  SerialBuffer sBuffer;
84 };
85 
86 #endif
87 
88 
89 #endif /* ARDUINO_UTILS_WIMODHWINTERFACEWRAPPER_H_ */
SerialBuffer.h
SerialBuffer
Definition: SerialBuffer.h:77
WimodHwInterfaceWrapper.h