this is avaiable project
Fork of LoRaMacLib by
Diff: LoRaMac-board.h
- Revision:
- 9:b3ddbad8c5e3
- Parent:
- 8:19a3b4a82c69
- Child:
- 10:66e623be7f8a
--- a/LoRaMac-board.h Fri Nov 06 17:38:56 2015 +0000 +++ b/LoRaMac-board.h Mon Nov 30 10:00:41 2015 +0000 @@ -33,7 +33,7 @@ /*! * Default datarate used by the node */ -#define LORAMAC_DEFAULT_DATARATE DR_5 +#define LORAMAC_DEFAULT_DATARATE DR_0 /*! * Minimal Tx output power that can be used by the node @@ -80,8 +80,6 @@ #define DR_6 6 // SF7 - BW250 #define DR_7 7 // FSK -#define USE_BAND_868 - /*! * LoRaMac default channels definition */ @@ -151,9 +149,39 @@ * LoRaMac default channels */ // Channel = { Frequency [Hz], { ( ( DrMax << 4 ) | DrMin ) }, Band } -#define LC1 { 902300000, { ( ( DR_5 << 4 ) | DR_2 ) }, 0 } -#define LC2 { 902500000, { ( ( DR_5 << 4 ) | DR_2 ) }, 0 } -#define LC3 { 902700000, { ( ( DR_5 << 4 ) | DR_2 ) }, 0 } +#define LC1 { 902300000, { ( ( DR_5 << 4 ) | DR_0 ) }, 0 } +#define LC2 { 902500000, { ( ( DR_5 << 4 ) | DR_0 ) }, 0 } +#define LC3 { 902700000, { ( ( DR_5 << 4 ) | DR_0 ) }, 0 } + +#elif defined( USE_BAND_433 ) + +/*! + * Second reception window channel definition. + */ +// Channel = { Frequency [Hz], Datarate } +#define RX_WND_2_CHANNEL { 434900000, DR_3 } + +/*! + * LoRaMac maximum number of bands + */ +#define LORA_MAX_NB_BANDS 1 + +// Band = { DutyCycle, TxMaxPower, LastTxDoneTime, TimeOff } +#define BAND0 { 1, TX_POWER_14_DBM, 0, 0 } // 100.0 % + +/*! + * LoRaMac default channels + */ +// Channel = { Frequency [Hz], { ( ( DrMax << 4 ) | DrMin ) }, Band } +#define LC1 { 433300000, { ( ( DR_5 << 4 ) | DR_0 ) }, 0 } +#define LC2 { 433500000, { ( ( DR_5 << 4 ) | DR_0 ) }, 0 } +#define LC3 { 433700000, { ( ( DR_5 << 4 ) | DR_0 ) }, 0 } +#define LC4 { 433900000, { ( ( DR_5 << 4 ) | DR_0 ) }, 0 } +#define LC5 { 434100000, { ( ( DR_5 << 4 ) | DR_0 ) }, 0 } +#define LC6 { 434300000, { ( ( DR_5 << 4 ) | DR_0 ) }, 0 } +#define LC7 { 434500000, { ( ( DR_5 << 4 ) | DR_0 ) }, 0 } +#define LC8 { 434700000, { ( ( DR_5 << 4 ) | DR_0 ) }, 0 } +#define LC9 { 000000000, { ( ( DR_5 << 4 ) | DR_0 ) }, 0 } #else #error "Please define a frequency band in the compiler options."