app3

Dependencies:   mbed

Fork of Code_APP1 by Louis Beaulieu

Revision:
9:dc81d8ee4a97
diff -r 6f2b7f9b0d0d -r dc81d8ee4a97 xbee.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xbee.h	Tue Feb 14 04:11:07 2017 +0000
@@ -0,0 +1,30 @@
+#include "mbed.h"
+
+#ifndef XBEE_H
+#define XBEE_H
+
+struct Addresse_64Bit {
+    char bit[8];
+};
+
+struct Addresse_16Bit {
+    char bit[2];
+};
+
+struct CArray {
+    char* _ptr;
+    short size;
+    char _FrameType;
+    Addresse_64Bit _64bit;
+    Addresse_16Bit _16bit;
+    char* options;
+    char opt_size;
+};
+
+char calculate_checksum(CArray* message, short header_size);
+void send(Serial* COM, CArray* message);
+void read(Serial* COM, CArray* returnValue);
+void read(Serial* COM, CArray* returnValue);
+void setPAN(Serial* COM, short pan_id);
+
+#endif // XBEE_H
\ No newline at end of file