Bind
C++ UI toolkit for Arduino
 
Loading...
Searching...
No Matches
DataProtocol.h
1#ifndef __DATAPROTOCOL_H
2#define __DATAPROTOCOL_H
3#include <stdint.h>
4#include <string.h>
5#include "Stream.h"
6#include "SLPacker.hpp"
7
8static uint8_t VERSIONID = 0;
9
10enum DataDirection
11{
12 toAndroid,
13 fromAndroid
14};
15
16int sendFrame(uint8_t *destBuffer, uint8_t const *buffer, size_t len);
17bool checkCRC(uint8_t const *buffer, size_t len);
19{
20private:
21 SLPacker slPacker;
22
23public:
24 static size_t sendFrame(uint8_t *destBuffer, uint8_t const *buffer, size_t len);
25 static size_t sendFrame(uint8_t *destBuffer, uint8_t const *buffer, size_t len, Stream *stream);
26 uint8_t *buf = slPacker.buf;
27 int update(uint8_t inp);
28};
29
30#endif /* __DATAPROTOCOL_H */
Definition DataProtocol.h:19
Definition SLPacker.hpp:14