Librairie xbee.

Dependents:   NerfUS-Coord NerfUSTarget

Fork of APP3_xbee by Team APP

Revision:
8:b9c096965c00
Parent:
6:b70f32a80d51
Child:
9:04063c29ab43
Child:
10:612739c6d27d
--- a/xbee.h	Tue Feb 14 01:13:18 2017 +0000
+++ b/xbee.h	Tue Feb 14 02:38:18 2017 +0000
@@ -6,6 +6,12 @@
 #include "mbed.h"
 #include "rtos.h"
 
+struct ingoing_value_t
+{
+    char content[11];
+    int size;
+};
+
 //See xbee document page 99
 const char FRAME_TYPE_RECEIVE_PACKET = 0x90;
 const char FRAME_TYPE_TRANSMIT_STATUS = 0x8B;
@@ -17,7 +23,10 @@
 const char EVENT_TYPE_BUTTON = 0x00;
 const char EVENT_TYPE_ACCELEROMETER = 0x01;
 
-extern Mail<vector<char>, 30> parsed_frames;
+const char BUTTON_PRESSED = 0x00;
+const char BUTTON_RELEASED = 0x01;
+
+extern Mail<ingoing_value_t, 30> parsed_frames;
 extern RawSerial xbee;
 
 void send_message_via_xbee(const char* message, const int length);
@@ -37,4 +46,6 @@
 //Simplify the frame to only contain the frame type and the relevant data for our application
 vector<char> parse_frame(const vector<char>& frame);
 
+vector<char> ingoing_value_to_vector(const ingoing_value_t& value);
+
 #endif
\ No newline at end of file