RobOmega - PSL RoboCup / Mbed 2 deprecated nRF24L01P_L475VG_CarteBleu

Dependencies:   mbed nRF24L01P

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers protocol.h Source File

protocol.h

00001 #ifndef PROTOCOL_H
00002 #define PROTOCOL_H
00003 
00004 //Etats de receptions
00005 #define WAITING 0
00006 #define FUNCTION_MSB 1
00007 #define FUNCTION_LSB 2
00008 #define LENGTH_MSB 3
00009 #define LENGTH_LSB 4
00010 #define PAYLOAD 5
00011 #define CHECKSUM 6
00012 
00013 //Numéro des fonctions
00014 #define COMMAND_ID_TEXT 0x0020
00015 
00016 //Taille des trames pour certaines fonctions 
00017 //#define
00018 
00019 //Prototypes des fonctions
00020 int encodeMessage(int msgFunction, int msgPayloadLength, char* msgPayload, char* msg);
00021 char calculateChecksum(int msgFunction, int msgPayloadLength, char* msgPayload);
00022 void decodeMessage(char receivedByte);
00023 
00024 #endif