1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-24 22:13:52 +01:00

Merge pull request #11583 from aabadie/pr/pkg/semtech-loramac-cflags

pkg/semtech-loramac: move region CFLAGS definitions from applications to pkg
This commit is contained in:
Francisco 2019-05-28 18:42:03 +02:00 committed by GitHub
commit b8d602abdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 10 deletions

View File

@ -17,7 +17,7 @@ APPKEY ?= 00000000000000000000000000000000
DRIVER ?= sx1276
# Default region is Europe and default band is 868MHz
REGION ?= EU868
LORA_REGION ?= EU868
# Include the Semtech-loramac package
USEPKG += semtech-loramac
@ -26,9 +26,7 @@ USEMODULE += $(DRIVER)
USEMODULE += fmt
FEATURES_REQUIRED += periph_rtc
CFLAGS += -DREGION_$(REGION)
CFLAGS += -DDEVEUI=\"$(DEVEUI)\" -DAPPEUI=\"$(APPEUI)\" -DAPPKEY=\"$(APPKEY)\"
CFLAGS += -DLORAMAC_ACTIVE_REGION=LORAMAC_REGION_$(REGION)
# Comment this out to disable code in RIOT that does safety checking
# which is not needed in a production environment but helps in the

View File

@ -18,12 +18,12 @@ Simply build and flash the application for a ST B-L072Z-LRWAN1 board:
make flash term
Use the `BOARD`, `DRIVER` and `REGION` make variables to adapt the application
Use the `BOARD`, `DRIVER` and `LORA_REGION` make variables to adapt the application
to your hardware setup and region of use:
- `BOARD` can be one of the nucleo-64 boards
- `DRIVER` can be either `sx1276` or `sx1272`
- `REGION` can be `EU868`, `US915`, etc (see LoRaWAN regional parameters for
- `LORA_REGION` can be `EU868`, `US915`, etc (see LoRaWAN regional parameters for
details).
ST Nucleo-64 can be used with mbed LoRa shields: there's one based on

View File

@ -1,3 +1,9 @@
INCLUDES += -I$(RIOTBASE)/pkg/semtech-loramac/include
DIRS += $(RIOTBASE)/pkg/semtech-loramac/contrib
# Use EU868 as default region
LORA_REGION ?= EU868
CFLAGS += -DREGION_$(LORA_REGION)
CFLAGS += -DLORAMAC_ACTIVE_REGION=LORAMAC_REGION_$(LORA_REGION)

View File

@ -31,8 +31,7 @@
* to the physical support, the region where the device is used needs to be
* set at compile time. Example for EU868:
* ```
* CFLAGS += -DREGION_EU868
* CFLAGS += -DLORAMAC_ACTIVE_REGION=LORAMAC_REGION_EU868
* LORA_REGION = EU868
* ```
*
* # Using the package API

View File

@ -21,7 +21,4 @@ USEMODULE += fmt
FEATURES_OPTIONAL += periph_eeprom
CFLAGS += -DREGION_$(LORA_REGION)
CFLAGS += -DLORAMAC_ACTIVE_REGION=LORAMAC_REGION_$(LORA_REGION)
include $(RIOTBASE)/Makefile.include