RobOmega - PSL RoboCup / Mbed OS nRF24L01P_L432KC_CarteBlanche

Dependencies:   nRF24L01P_Hello_World nRF24L01P

Revision:
4:5caf9e1dc16c
Child:
5:668dd9395ca5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/protocol.h	Fri Jan 08 08:51:10 2021 +0000
@@ -0,0 +1,24 @@
+#ifndef PROTOCOL_H
+#define PROTOCOL_H
+
+//Etats de receptions
+#define WAITING 0
+#define FUNCTION_MSB 1
+#define FUNCTION_LSB 2
+#define LENGTH_MSB 3
+#define LENGTH_LSB 4
+#define PAYLOAD 5
+#define CHECKSUM 6
+
+//Numéro des fonctions
+#define COMMAND_ID_TEXT 0x0020
+
+//Taille des trames pour certaines fonctions 
+//#define
+
+//Prototypes des fonctions
+int encodeMessage(int msgFunction, int msgPayloadLength, char* msgPayload, char* msg);
+char calculateChecksum(int msgFunction, int msgPayloadLength, char* msgPayload);
+void decodeMessage(char receivedByte);
+
+#endif
\ No newline at end of file