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

pkg/semtech-loramac: provide a way to disable dutycycle

Duty cycle can be disabled by building the application using CFLAGS=-DDISABLE_LORAMAC_DUTYCYCLE
This commit is contained in:
Alexandre Abadie 2019-03-23 07:32:51 +01:00
parent 01fb5335a2
commit 4e827085f7
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405

View File

@ -40,6 +40,7 @@
#include "semtech_loramac.h"
#include "LoRaMac.h"
#include "LoRaMacTest.h"
#include "region/Region.h"
#ifdef MODULE_PERIPH_EEPROM
@ -427,6 +428,9 @@ void _init_loramac(semtech_loramac_t *mac,
primitives->MacMlmeIndication = mlme_indication;
LoRaMacInitialization(&semtech_loramac_radio_events, primitives, callbacks,
LORAMAC_ACTIVE_REGION);
#ifdef DISABLE_LORAMAC_DUTYCYCLE
LoRaMacTestSetDutyCycleOn(false);
#endif
mutex_unlock(&mac->lock);
semtech_loramac_set_dr(mac, LORAMAC_DEFAULT_DR);