standalone sx1276 demo program

Dependencies:   SX1276Lib mbed

Fork of SX1276_GPS by CaryCoders

Revision:
33:319cbac3b6eb
Parent:
32:a2472bbe7c92
--- a/main.h	Wed Jul 29 12:14:42 2015 +0000
+++ b/main.h	Thu Sep 03 14:33:55 2015 +0000
@@ -14,8 +14,11 @@
 */
 #ifndef __MAIN_H__
 #define __MAIN_H__
+#define STANDALONE 1
+#ifndef STANDALONE
 #include "lcdadafruit.h"
 #include "GPS.h"
+#endif
 #include "enums.h"
 #include "typedefs.h"
 
@@ -55,7 +58,7 @@
 /*!
  * @brief Function executed on CAD Done event
  */
-void OnCadDone( void );
+void OnCadDone( bool activity );
 
 char* itoa(int val, int base);
 unsigned int randomSeed(void);
@@ -89,7 +92,7 @@
 /* Set this flag to '1' to display debug messages on the console */
 #define DEBUG_MESSAGE   1
 #define TX_OUTPUT_POWER                                 20        // 14 dBm
-#define LORA_BANDWIDTH                                  2         // [0: 125 kHz,
+#define LORA_BANDWIDTH                                  0         // [0: 125 kHz,
                                                                   //  1: 250 kHz,
                                                                   //  2: 500 kHz,
                                                                   //  3: Reserved]
@@ -115,10 +118,12 @@
 #endif
  
 typedef RadioState States_t;
+#ifndef STANDALONE
 extern LCDadafruit cLCD;
+extern GPS gpsd;
+#endif
 extern volatile States_t State;
 extern SX1276MB1xAS Radio;
-extern GPS gpsd;
 extern uint8_t PingMsg[];
 extern uint8_t PongMsg[];
 extern uint8_t HelloMsg[];
@@ -129,6 +134,8 @@
 extern float Frequency;
 extern float distance;
 extern float r_latitude;
+extern float r_latitude_last;
+extern float r_longitude_last;
 extern float r_longitude;
 extern int TxPower;
 extern int Bandwidth;
@@ -148,6 +155,7 @@
 extern int txLen;
 extern int16_t RssiValue;
 extern int8_t SnrValue;
+extern DigitalOut RXin;
 #define PCBUF_SIZE 64
 #define PI 3.14159265