Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: nRF24L01P_Hello_World nRF24L01P
main.h
- Committer:
- voltxd
- Date:
- 2020-12-18
- Revision:
- 3:f8b9397e9272
- Child:
- 4:5caf9e1dc16c
File content as of revision 3:f8b9397e9272:
#ifndef MAIN_H #define MAIN_H //Pins du module RF #define SPI3_MOSI D11 #define SPI3_MISO D12 #define SPI3_SCLK D13 #define CSN A3 #define CE D8 #define IRQ A0 //Taille de la trame envoyé #define TRANSFER_SIZE 4 #define PAYLOAD_MAX_LENGTH 128 //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 //Taille des trames pour chaque fonctions //#define int encodeMessage(int msgFunction, int msgPayloadLength, char* msgPayload, char* msg); char calculateChecksum(int msgFunction, int msgPayloadLength, char* msgPayload); void decodeMessage(char receivedByte); #endif