Skip to content

Commit 9af3953

Browse files
committed
chore: allow some redefinitions
Fixes stm32duino#10 Signed-off-by: Frederic Pillon <[email protected]>
1 parent b013ff1 commit 9af3953

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/STM32CubeWL/LoRaWAN/Mac/Region/RegionEU868.h

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ extern "C"
7777
/*!
7878
* Maximal datarate that can be used by the node
7979
*/
80-
#define EU868_TX_MAX_DATARATE DR_7
80+
#ifndef EU868_TX_MAX_DATARATE
81+
#define EU868_TX_MAX_DATARATE DR_7
82+
#endif
8183

8284
/*!
8385
* Minimal datarate that can be used by the node
@@ -87,12 +89,16 @@ extern "C"
8789
/*!
8890
* Maximal datarate that can be used by the node
8991
*/
90-
#define EU868_RX_MAX_DATARATE DR_7
92+
#ifndef EU868_RX_MAX_DATARATE
93+
#define EU868_RX_MAX_DATARATE DR_7
94+
#endif
9195

9296
/*!
9397
* Default datarate used by the node
9498
*/
95-
#define EU868_DEFAULT_DATARATE DR_0
99+
#ifndef EU868_DEFAULT_DATARATE
100+
#define EU868_DEFAULT_DATARATE DR_0
101+
#endif
96102

97103
/*!
98104
* Minimal Rx1 receive datarate offset
@@ -127,7 +133,9 @@ extern "C"
127133
/*!
128134
* Default antenna gain
129135
*/
130-
#define EU868_DEFAULT_ANTENNA_GAIN 2.15f
136+
#ifndef EU868_DEFAULT_ANTENNA_GAIN
137+
#define EU868_DEFAULT_ANTENNA_GAIN 2.15f
138+
#endif
131139

132140
/*!
133141
* Enabled or disabled the duty cycle

0 commit comments

Comments
 (0)