asdf

Dependencies:   SDFileSystem mbed

Fork of All_Combined_Real by JanPaul Bergeson

Revision:
5:6532c5a5f576
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xbee.h	Wed Mar 23 14:32:41 2016 +0000
@@ -0,0 +1,21 @@
+#ifndef XBEE_H
+#define XBEE_H
+
+#include "mbed.h"
+
+#define MAX_MESSAGE 256
+
+class XBee {
+    public:
+        XBee(){;}
+        ~XBee(){;}
+        
+        enum receive_state { INIT, LENGTH, TYPE, ADDR_LONG, ADDR_SHORT, OPTIONS, MESSAGE, CHECKSUM };
+        
+        int Receive(unsigned char *inbuf, int len, unsigned char *outbuf);
+        int Send(unsigned char *buf, int len, unsigned char *outbuf, uint64_t addr);
+    private:
+        int escape(unsigned char *input, int inlen, unsigned char *output);
+        int unescape(unsigned char *input, int inlen, unsigned char *output);
+};
+#endif
\ No newline at end of file