standalone sx1276 demo program

Dependencies:   SX1276Lib mbed

Fork of SX1276_GPS by CaryCoders

Revision:
32:a2472bbe7c92
Parent:
31:2c813f321db7
Child:
33:319cbac3b6eb
diff -r 2c813f321db7 -r a2472bbe7c92 main.h
--- a/main.h	Tue Jul 14 14:58:23 2015 +0000
+++ b/main.h	Wed Jul 29 12:14:42 2015 +0000
@@ -63,7 +63,6 @@
 void ping_pong(void);
 void start_hello(void);
 void hello(void);
-void check_gps(void);
 int get_kbd_str(char* buf, int size);
 void console_chat();
 void console();
@@ -74,6 +73,8 @@
 void print_bandwidth();
 void print_cr();
 void print_power();
+void gps_setup(void);
+int check_gps(void);
 
 /*
  *  Global variables declarations
@@ -85,6 +86,27 @@
 #define TX_TIMEOUT_VALUE                                4000000   // in us
 #define BUFFER_SIZE                                     256        // Define the payload size here
 #define RADIO_INSTALLED                                 true
+/* 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,
+                                                                  //  1: 250 kHz,
+                                                                  //  2: 500 kHz,
+                                                                  //  3: Reserved]
+// #define LORA_SPREADING_FACTOR                        7         // [SF7..SF12]
+#define LORA_SPREADING_FACTOR                           12        // [SF7..SF12]
+// #define LORA_CODINGRATE                              1         // [1: 4/5,
+#define LORA_CODINGRATE                                 2         // [1: 4/5,
+                                                                  //  2: 4/6,
+                                                                  //  3: 4/7,
+                                                                  //  4: 4/8]
+#define LORA_PREAMBLE_LENGTH                            8         // Same for Tx and Rx
+#define LORA_SYMBOL_TIMEOUT                             5         // Symbols
+#define LORA_FIX_LENGTH_PAYLOAD_ON                      false
+#define LORA_FHSS_ENABLED                               false  
+#define LORA_NB_SYMB_HOP                                4     
+#define LORA_IQ_INVERSION_ON                            false
+#define LORA_CRC_ENABLED                                true
 
 #if( defined ( TARGET_KL25Z ) || defined ( TARGET_LPC11U6X ) )
 extern DigitalOut led;
@@ -105,6 +127,9 @@
 extern uint8_t BufferRx[];
 // radfta extern vt100 ctrl;
 extern float Frequency;
+extern float distance;
+extern float r_latitude;
+extern float r_longitude;
 extern int TxPower;
 extern int Bandwidth;
 extern int SpreadingFactor;
@@ -124,6 +149,7 @@
 extern int16_t RssiValue;
 extern int8_t SnrValue;
 #define PCBUF_SIZE 64
+#define PI 3.14159265
 
 typedef enum {
     APP_NONE = 0,