This program is guided to help establish a connection between two RFM95 900MHz LoRa radio modules using Maxim Integrated's Feather MCUs (MAX32630FTHR Mbed and the MAX32620FTHR Mbed). Once the radios are configured after powering on and if the radios are wired correctly, the two radios will self identify as either a master or a slave, and will then proceed to PING and PONG back and forth. Information about what is happening between the radios can be seen if the two boards are hooked up to a USB COM port through the included DAPLINK/MAX32625PICO modules.

Dependencies:   BufferedSerial SX1276GenericLib USBDeviceHT max32630fthr

Fork of MAX326xxFTHR_LoRa_PingPong by Devin Alexander

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers GenericPingPong.h Source File

GenericPingPong.h

00001 /*
00002  / _____)             _              | |
00003 ( (____  _____ ____ _| |_ _____  ____| |__
00004  \____ \| ___ |    (_   _) ___ |/ ___)  _ \
00005  _____) ) ____| | | || |_| ____( (___| | | |
00006 (______/|_____)_|_|_| \__)_____)\____)_| |_|
00007     ( C )2014 Semtech
00008 
00009 Description: Contains the callbacks for the IRQs and any application related details
00010 
00011 License: Revised BSD License, see LICENSE.TXT file include in the project
00012 
00013 Maintainer: Miguel Luis and Gregory Cristian
00014 */
00015 
00016 /*
00017  * This file contains a copy of the master content sx1276PingPong
00018  * with adaption for the SX1276Generic environment
00019  * (c) 2017 Helmut Tschemernjak
00020  * 30826 Garbsen (Hannover) Germany
00021  */
00022  
00023 #ifndef __SX1276PINGPONG_H__
00024 #define __SX1276PINGPONG_H__
00025 
00026 /*
00027 #ifdef FEATURE_LORA
00028 int SX1276PingPong(void);
00029 #else
00030 #define  SX1276PingPong(x)   void()
00031 #endif
00032 */
00033 
00034 int SX1276PingPong(void);
00035 
00036 /*
00037  * Callback functions prototypes
00038  */
00039 /*!
00040  * @brief Function to be executed on Radio Tx Done event
00041  */
00042 void OnTxDone(void *radio, void *userThisPtr, void *userData);
00043 
00044 /*!
00045  * @brief Function to be executed on Radio Rx Done event
00046  */
00047 void OnRxDone(void *radio, void *userThisPtr, void *userData, uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr );
00048 
00049 /*!
00050  * @brief Function executed on Radio Tx Timeout event
00051  */
00052 void OnTxTimeout(void *radio, void *userThisPtr, void *userData);
00053 
00054 /*!
00055  * @brief Function executed on Radio Rx Timeout event
00056  */
00057 void OnRxTimeout(void *radio, void *userThisPtr, void *userData);
00058 
00059 /*!
00060  * @brief Function executed on Radio Rx Error event
00061  */
00062 void OnRxError(void *radio, void *userThisPtr, void *userData);
00063 
00064 /*!
00065  * @brief Function executed on Radio Fhss Change Channel event
00066  */
00067 void OnFhssChangeChannel(void *radio, void *userThisPtr, void *userData, uint8_t channelIndex);
00068 
00069 /*!
00070  * @brief Function executed on CAD Done event
00071  */
00072 void OnCadDone(void *radio, void *userThisPtr, void *userData);
00073 
00074 #endif // __MAIN_H__