mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
net/lora : Move 'LORA_BW_DEFAULT' to 'CONFIG_'
Added choices and moved 'LORA_BW_DEFAULT" to 'CONFIG_' namespace
This commit is contained in:
parent
979700cd45
commit
349d20349d
@ -171,7 +171,7 @@ void sx127x_init_radio_settings(sx127x_t *dev)
|
||||
sx127x_set_channel(dev, SX127X_CHANNEL_DEFAULT);
|
||||
sx127x_set_modem(dev, SX127X_MODEM_DEFAULT);
|
||||
sx127x_set_tx_power(dev, SX127X_RADIO_TX_POWER);
|
||||
sx127x_set_bandwidth(dev, LORA_BW_DEFAULT);
|
||||
sx127x_set_bandwidth(dev, CONFIG_LORA_BW_DEFAULT);
|
||||
sx127x_set_spreading_factor(dev, LORA_SF_DEFAULT);
|
||||
sx127x_set_coding_rate(dev, LORA_CR_DEFAULT);
|
||||
sx127x_set_crc(dev, LORA_PAYLOAD_CRC_ON_DEFAULT);
|
||||
|
@ -24,6 +24,8 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "kernel_defines.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -48,9 +50,17 @@ extern "C" {
|
||||
#define CONFIG_LORA_SYMBOL_TIMEOUT_DEFAULT (10U)
|
||||
#endif
|
||||
|
||||
#if IS_ACTIVE(CONFIG_LORA_BW_DEFAULT_125)
|
||||
#define CONFIG_LORA_BW_DEFAULT (LORA_BW_125_KHZ)
|
||||
#elif IS_ACTIVE(CONFIG_LORA_BW_DEFAULT_250)
|
||||
#define CONFIG_LORA_BW_DEFAULT (LORA_BW_250_KHZ)
|
||||
#elif IS_ACTIVE(CONFIG_LORA_BW_DEFAULT_500)
|
||||
#define CONFIG_LORA_BW_DEFAULT (LORA_BW_500_KHZ)
|
||||
#endif
|
||||
|
||||
/** @brief Set default bandwidth to 125kHz */
|
||||
#ifndef LORA_BW_DEFAULT
|
||||
#define LORA_BW_DEFAULT (LORA_BW_125_KHZ)
|
||||
#ifndef CONFIG_LORA_BW_DEFAULT
|
||||
#define CONFIG_LORA_BW_DEFAULT (LORA_BW_125_KHZ)
|
||||
#endif
|
||||
|
||||
/** @brief Set default spreading factor to 12 */
|
||||
|
Loading…
Reference in New Issue
Block a user