got this sample program for 2+ sx1276 modules to communicate in a ping pong fashion. This program has been tested and verified to run with 915MHz Hope RFM95 modules running with MAX32620FTHR and MAX32630FTHR micro controllers.
Dependencies: BMI160 BufferedSerial SX1276GenericLib USBDeviceHT max32630fthr
Fork of STM32L0_LoRa by
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__
Generated on Fri Jul 22 2022 16:52:08 by 1.7.2