1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

net/lorawan : Move 'LORAMAC_DEFAULT_DEVICE_CLASS' to 'CONFIG_'

Move 'LORAMAC_DEFAULT_DEVICE_CLASS' to 'CONFIG_' and added
additional symbols for Kconfig exposure.
This commit is contained in:
Akshai M 2020-11-20 14:45:25 +01:00
parent 9e626f471a
commit e46c4401a9
2 changed files with 13 additions and 3 deletions

View File

@ -378,7 +378,7 @@ void _init_loramac(semtech_loramac_t *mac,
semtech_loramac_set_dr(mac, LORAMAC_DEFAULT_DR);
semtech_loramac_set_adr(mac, LORAMAC_DEFAULT_ADR);
semtech_loramac_set_public_network(mac, LORAMAC_DEFAULT_PUBLIC_NETWORK);
semtech_loramac_set_class(mac, LORAMAC_DEFAULT_DEVICE_CLASS);
semtech_loramac_set_class(mac, CONFIG_LORAMAC_DEFAULT_DEVICE_CLASS);
semtech_loramac_set_tx_port(mac, LORAMAC_DEFAULT_TX_PORT);
semtech_loramac_set_tx_mode(mac, LORAMAC_DEFAULT_TX_MODE);
semtech_loramac_set_system_max_rx_error(mac,

View File

@ -103,9 +103,19 @@ extern "C" {
/**
* @brief Default device class (A, B or C)
*
* @note GNRC LoRaWAN only supports Class A
*/
#ifndef LORAMAC_DEFAULT_DEVICE_CLASS
#define LORAMAC_DEFAULT_DEVICE_CLASS (LORAMAC_CLASS_A)
#if IS_ACTIVE(CONFIG_LORAMAC_DEFAULT_DEVICE_CLASS_A)
#define CONFIG_LORAMAC_DEFAULT_DEVICE_CLASS (LORAMAC_CLASS_A)
#elif IS_ACTIVE(CONFIG_LORAMAC_DEFAULT_DEVICE_CLASS_B)
#define CONFIG_LORAMAC_DEFAULT_DEVICE_CLASS (LORAMAC_CLASS_B)
#elif IS_ACTIVE(CONFIG_LORAMAC_DEFAULT_DEVICE_CLASS_C)
#define CONFIG_LORAMAC_DEFAULT_DEVICE_CLASS (LORAMAC_CLASS_C)
#endif
#ifndef CONFIG_LORAMAC_DEFAULT_DEVICE_CLASS
#define CONFIG_LORAMAC_DEFAULT_DEVICE_CLASS (LORAMAC_CLASS_A)
#endif
/**