wayne roberts / Mbed OS LoRaWAN_singlechannel_endnode

Dependencies:   SX127x sx12xx_hal TSL2561

Revision:
18:9ac71c0eb70d
Parent:
16:915815632c1f
Child:
23:a862b5601663
diff -r 3215f12051f9 -r 9ac71c0eb70d mac/LoRaMac-definitions.h
--- a/mac/LoRaMac-definitions.h	Fri Jul 28 22:18:46 2017 +0000
+++ b/mac/LoRaMac-definitions.h	Wed Aug 02 11:42:33 2017 -0700
@@ -71,10 +71,6 @@
 // Band = { DutyCycle, TxMaxPower, LastTxDoneTime, TimeOff }
 #define BAND0              { 1, TX_POWER_20_DBM, 0/*,  0*/ } //  100.0 %
 
-/*!
- * LoRaMac maximum number of channels
- */
-#define LORA_MAX_NB_CHANNELS                        8
 
 /*!
  * Default datarate used by the node
@@ -92,15 +88,49 @@
 #define LORAMAC_DEFAULT_TX_POWER                    TX_POWER_20_DBM
 
 /*!
- * Minimal datarate that can be used by the node
+ * Minimal (slowest) datarate that can be used by the node
  */
-#define LORAMAC_RX_MIN_DATARATE                     DR_8
+#define LORAMAC_MIN_DATARATE                     DR_8
 
 /*!
- * Maximal datarate that can be used by the node
+ * Maximal (fastest) datarate that can be used by the node
  */
-#define LORAMAC_RX_MAX_DATARATE                     DR_13
+#define LORAMAC_MAX_DATARATE                     DR_13
+
+    /* end us915 */
+#elif defined (USE_BAND_433) && defined (ENABLE_SX1276)
+    #define TX_POWER_10_DBM    0
+    #define TX_POWER_07_DBM    1
+    #define TX_POWER_04_DBM    2
+    #define TX_POWER_01_DBM    3
+    #define TX_POWER_M2_DBM    4
+    #define TX_POWER_M5_DBM    5
+
+    #define LORAMAC_DEFAULT_TX_POWER            TX_POWER_10_DBM
+
+    #define LORAMAC_MIN_TX_POWER                TX_POWER_M5_DBM
+    #define LORAMAC_MAX_TX_POWER                TX_POWER_10_DBM
 
+    #define DR_0                             0  // SF12 - BW125
+    #define DR_1                             1  // SF11 - BW125
+    #define DR_2                             2  // SF10 - BW125
+    #define DR_3                             3  // SF9  - BW125
+    #define DR_4                             4  // SF8  - BW125
+    #define DR_5                             5  // SF7  - BW125
+    #define DR_6                             6  // SF7  - BW250
+    #define DR_7                             7  // FSK
+
+    #define LORAMAC_MIN_DATARATE             DR_0   // slowest
+    #define LORAMAC_MAX_DATARATE             DR_5   // fastest
+
+    //#define LORAMAC_DEFAULT_DATARATE                    DR_0   //  sf12, 32768us
+    //#define LORAMAC_DEFAULT_DATARATE                    DR_1   //  sf11, 16384us
+    //#define LORAMAC_DEFAULT_DATARATE                    DR_2   //  sf10, 8192us
+    //#define LORAMAC_DEFAULT_DATARATE                    DR_3   //  sf9, 4096us
+    //#define LORAMAC_DEFAULT_DATARATE                    DR_4   //  sf8, 2048us
+    #define LORAMAC_DEFAULT_DATARATE                    DR_5   //  sf7, 1024us
+
+    /* end USE_BAND_433 */
 #else
     #error "Please define a frequency band in the compiler options."
 #endif