Skip to content

Commit 24d55f6

Browse files
authored
Move LORAMAC[_FALLBACK]?_VERSION macros to the header file (#1291)
* Move LORAMAC[_FALLBACK]?_VERSION macros to the header file This trivial change makes the two version values accessible to the application using LoRaMac-node. Being able to obtain the most recent supported MAC version is useful in case the application needs to generate data, e.g., for backend (TTN) provisioning. * Remove ifndef guard surrounding LORAMAC_VERSION The guard appears to be a leftover from a previous library version and is no longer needed.
1 parent bc9a93e commit 24d55f6

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

src/mac/LoRaMac.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,6 @@
4848

4949
#include "LoRaMac.h"
5050

51-
#ifndef LORAMAC_VERSION
52-
/*!
53-
* LoRaWAN version definition.
54-
*/
55-
#define LORAMAC_VERSION 0x01010100
56-
#endif
57-
58-
/*!
59-
* LoRaWAN fallback version definition.
60-
*/
61-
#define LORAMAC_FALLBACK_VERSION 0x01000400
62-
6351
/*!
6452
* Maximum PHY layer payload size
6553
*/

src/mac/LoRaMac.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,16 @@ extern "C"
8383
#include "secure-element-nvm.h"
8484
#include "LoRaMacClassBNvm.h"
8585

86+
/*!
87+
* LoRaWAN version definition.
88+
*/
89+
#define LORAMAC_VERSION 0x01010100
90+
91+
/*!
92+
* LoRaWAN fallback version definition.
93+
*/
94+
#define LORAMAC_FALLBACK_VERSION 0x01000400
95+
8696
/*!
8797
* Maximum number of times the MAC layer tries to get an acknowledge.
8898
*/

0 commit comments

Comments
 (0)