diff options
author | Jakob Odersky <jodersky@gmail.com> | 2013-02-25 19:39:53 +0100 |
---|---|---|
committer | Jakob Odersky <jodersky@gmail.com> | 2013-02-25 19:39:53 +0100 |
commit | e15a7e1267a6f733d734c5d3b59f3acc28bb4b29 (patch) | |
tree | 9d9c513492939c4467c0932a25291a63d787a7ca /arduino/ace_cpp_old/SafeSerial.h | |
download | ace-e15a7e1267a6f733d734c5d3b59f3acc28bb4b29.tar.gz ace-e15a7e1267a6f733d734c5d3b59f3acc28bb4b29.tar.bz2 ace-e15a7e1267a6f733d734c5d3b59f3acc28bb4b29.zip |
initial commit
Diffstat (limited to 'arduino/ace_cpp_old/SafeSerial.h')
-rw-r--r-- | arduino/ace_cpp_old/SafeSerial.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/arduino/ace_cpp_old/SafeSerial.h b/arduino/ace_cpp_old/SafeSerial.h new file mode 100644 index 0000000..12dba3e --- /dev/null +++ b/arduino/ace_cpp_old/SafeSerial.h @@ -0,0 +1,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 */ |