aboutsummaryrefslogtreecommitdiff
path: root/arduino/ace_cpp_old/SafeSerial.h
blob: 12dba3e1592ceecb4a25b47590a78af4c31a2860 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef SAFESERIAL_H
#define SAFESERIAL_H

#include <inttypes.h>
#include "Framer.h"

//#define MAX_PACKET_SIZE 64
//#define MAX_FRAME_SIZE MAX_PACKET_SIZE + 3

#define SERIAL_BUFFER_SIZE 64

class SafeSerial: public Framer {
private:
  void sendByte(uint8_t byte);
  
  
protected:
  /* virtual */ void onSendByte(uint8_t byte) {};
  /* virtual */ void onFrame(uint16_t length, uint8_t *data) {};
  
};

#endif /* SAFESERIAL_H */