SX1276 Ping Pong FHSS Demo Application

Dependencies:   SX1276Lib mbed

Ping-Pong demo application using FHSS (Frequency Hoping Spread Spectrum) between two SX1276MB1xAs demo board.

Application demonstrating simple Tx/Rx between two boards. By default, each board starts as a "master" and will transmit a "Ping" message, and then wait for an answer. The first board receiving a "Ping" message will become a slave and answer the "master" with a "Pong". The Ping-Pong is then started...

Committer:
mluis
Date:
Mon Apr 24 13:23:42 2017 +0000
Revision:
6:235854d4b0c4
Parent:
1:41b10c760ff2
WARNING: Radio API timings changed from micro-seconds to milliseconds; ; Updated SX1276Lib and mbed libraries to the latest versions

Who changed what in which revision?

UserRevisionLine numberNew contents of line
GregCr 0:db48addeabda 1 /*
GregCr 0:db48addeabda 2 / _____) _ | |
GregCr 0:db48addeabda 3 ( (____ _____ ____ _| |_ _____ ____| |__
GregCr 0:db48addeabda 4 \____ \| ___ | (_ _) ___ |/ ___) _ \
GregCr 0:db48addeabda 5 _____) ) ____| | | || |_| ____( (___| | | |
GregCr 0:db48addeabda 6 (______/|_____)_|_|_| \__)_____)\____)_| |_|
GregCr 1:41b10c760ff2 7 ( C )2014 Semtech
GregCr 0:db48addeabda 8
GregCr 1:41b10c760ff2 9 Description: Contains the callbacks for the IRQs and any application related details
GregCr 0:db48addeabda 10
GregCr 0:db48addeabda 11 License: Revised BSD License, see LICENSE.TXT file include in the project
GregCr 0:db48addeabda 12
GregCr 0:db48addeabda 13 Maintainer: Miguel Luis and Gregory Cristian
GregCr 0:db48addeabda 14 */
GregCr 0:db48addeabda 15 #ifndef __MAIN_H__
GregCr 0:db48addeabda 16 #define __MAIN_H__
GregCr 0:db48addeabda 17
GregCr 0:db48addeabda 18
GregCr 0:db48addeabda 19 /*!
GregCr 0:db48addeabda 20 * Frequency hopping frequencies table
GregCr 0:db48addeabda 21 */
GregCr 1:41b10c760ff2 22 const uint32_t HoppingFrequencies[] =
GregCr 0:db48addeabda 23 {
GregCr 0:db48addeabda 24 916500000,
GregCr 0:db48addeabda 25 923500000,
GregCr 0:db48addeabda 26 906500000,
GregCr 0:db48addeabda 27 917500000,
GregCr 0:db48addeabda 28 917500000,
GregCr 0:db48addeabda 29 909000000,
GregCr 0:db48addeabda 30 903000000,
GregCr 0:db48addeabda 31 916000000,
GregCr 0:db48addeabda 32 912500000,
GregCr 0:db48addeabda 33 926000000,
GregCr 0:db48addeabda 34 925000000,
GregCr 0:db48addeabda 35 909500000,
GregCr 0:db48addeabda 36 913000000,
GregCr 0:db48addeabda 37 918500000,
GregCr 0:db48addeabda 38 918500000,
GregCr 0:db48addeabda 39 902500000,
GregCr 0:db48addeabda 40 911500000,
GregCr 0:db48addeabda 41 926500000,
GregCr 0:db48addeabda 42 902500000,
GregCr 0:db48addeabda 43 922000000,
GregCr 0:db48addeabda 44 924000000,
GregCr 0:db48addeabda 45 903500000,
GregCr 0:db48addeabda 46 913000000,
GregCr 0:db48addeabda 47 922000000,
GregCr 0:db48addeabda 48 926000000,
GregCr 0:db48addeabda 49 910000000,
GregCr 0:db48addeabda 50 920000000,
GregCr 0:db48addeabda 51 922500000,
GregCr 0:db48addeabda 52 911000000,
GregCr 0:db48addeabda 53 922000000,
GregCr 0:db48addeabda 54 909500000,
GregCr 0:db48addeabda 55 926000000,
GregCr 0:db48addeabda 56 922000000,
GregCr 0:db48addeabda 57 918000000,
GregCr 0:db48addeabda 58 925500000,
GregCr 0:db48addeabda 59 908000000,
GregCr 0:db48addeabda 60 917500000,
GregCr 0:db48addeabda 61 926500000,
GregCr 0:db48addeabda 62 908500000,
GregCr 0:db48addeabda 63 916000000,
GregCr 0:db48addeabda 64 905500000,
GregCr 0:db48addeabda 65 916000000,
GregCr 0:db48addeabda 66 903000000,
GregCr 0:db48addeabda 67 905000000,
GregCr 0:db48addeabda 68 915000000,
GregCr 0:db48addeabda 69 913000000,
GregCr 0:db48addeabda 70 907000000,
GregCr 0:db48addeabda 71 910000000,
GregCr 0:db48addeabda 72 926500000,
GregCr 0:db48addeabda 73 925500000,
GregCr 1:41b10c760ff2 74 911000000
GregCr 0:db48addeabda 75 };
GregCr 0:db48addeabda 76
GregCr 0:db48addeabda 77 /*
GregCr 0:db48addeabda 78 * Callback functions prototypes
GregCr 0:db48addeabda 79 */
GregCr 0:db48addeabda 80 /*!
GregCr 0:db48addeabda 81 * @brief Function to be executed on Radio Tx Done event
GregCr 0:db48addeabda 82 */
GregCr 0:db48addeabda 83 void OnTxDone( void );
GregCr 0:db48addeabda 84
GregCr 0:db48addeabda 85 /*!
GregCr 0:db48addeabda 86 * @brief Function to be executed on Radio Rx Done event
GregCr 0:db48addeabda 87 */
GregCr 0:db48addeabda 88 void OnRxDone( uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr );
GregCr 0:db48addeabda 89
GregCr 0:db48addeabda 90 /*!
GregCr 0:db48addeabda 91 * @brief Function executed on Radio Tx Timeout event
GregCr 0:db48addeabda 92 */
GregCr 0:db48addeabda 93 void OnTxTimeout( void );
GregCr 0:db48addeabda 94
GregCr 0:db48addeabda 95 /*!
GregCr 0:db48addeabda 96 * @brief Function executed on Radio Rx Timeout event
GregCr 0:db48addeabda 97 */
GregCr 0:db48addeabda 98 void OnRxTimeout( void );
GregCr 0:db48addeabda 99
GregCr 0:db48addeabda 100 /*!
GregCr 0:db48addeabda 101 * @brief Function executed on Radio Rx Error event
GregCr 0:db48addeabda 102 */
GregCr 0:db48addeabda 103 void OnRxError( void );
GregCr 0:db48addeabda 104
GregCr 0:db48addeabda 105 /*!
GregCr 0:db48addeabda 106 * @brief Function executed on Radio Fhss Change Channel event
GregCr 0:db48addeabda 107 */
GregCr 0:db48addeabda 108 void OnFhssChangeChannel( uint8_t channelIndex );
GregCr 0:db48addeabda 109
GregCr 0:db48addeabda 110 /*!
GregCr 0:db48addeabda 111 * @brief Function executed on CAD Done event
GregCr 0:db48addeabda 112 */
GregCr 0:db48addeabda 113 void OnCadDone( void );
GregCr 0:db48addeabda 114
mluis 6:235854d4b0c4 115 #endif // __MAIN_H__