mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
net/lora : Move 'LORA_CR_DEFAULT' to 'CONFIG_'
Added choices and moved 'LORA_CR_DEFAULT' to 'CONFIG_' namespace
This commit is contained in:
parent
aaeed98277
commit
a161476041
@ -173,7 +173,7 @@ void sx127x_init_radio_settings(sx127x_t *dev)
|
||||
sx127x_set_tx_power(dev, SX127X_RADIO_TX_POWER);
|
||||
sx127x_set_bandwidth(dev, CONFIG_LORA_BW_DEFAULT);
|
||||
sx127x_set_spreading_factor(dev, CONFIG_LORA_SF_DEFAULT);
|
||||
sx127x_set_coding_rate(dev, LORA_CR_DEFAULT);
|
||||
sx127x_set_coding_rate(dev, CONFIG_LORA_CR_DEFAULT);
|
||||
sx127x_set_crc(dev, LORA_PAYLOAD_CRC_ON_DEFAULT);
|
||||
sx127x_set_freq_hop(dev, LORA_FREQUENCY_HOPPING_DEFAULT);
|
||||
sx127x_set_hop_period(dev, LORA_FREQUENCY_HOPPING_PERIOD_DEFAULT);
|
||||
|
@ -84,9 +84,19 @@ extern "C" {
|
||||
#define CONFIG_LORA_SF_DEFAULT (LORA_SF12)
|
||||
#endif
|
||||
|
||||
#if IS_ACTIVE(CONFIG_LORA_CR_DEFAULT_CR_4_5)
|
||||
#define CONFIG_LORA_CR_DEFAULT (LORA_CR_4_5)
|
||||
#elif IS_ACTIVE(CONFIG_LORA_CR_DEFAULT_CR_4_6)
|
||||
#define CONFIG_LORA_CR_DEFAULT (LORA_CR_4_6)
|
||||
#elif IS_ACTIVE(CONFIG_LORA_CR_DEFAULT_CR_4_7)
|
||||
#define CONFIG_LORA_CR_DEFAULT (LORA_CR_4_7)
|
||||
#elif IS_ACTIVE(CONFIG_LORA_CR_DEFAULT_CR_4_8)
|
||||
#define CONFIG_LORA_CR_DEFAULT (LORA_CR_4_8)
|
||||
#endif
|
||||
|
||||
/** @brief Set default coding rate to 8 */
|
||||
#ifndef LORA_CR_DEFAULT
|
||||
#define LORA_CR_DEFAULT (LORA_CR_4_8)
|
||||
#ifndef CONFIG_LORA_CR_DEFAULT
|
||||
#define CONFIG_LORA_CR_DEFAULT (LORA_CR_4_8)
|
||||
#endif
|
||||
|
||||
/** @brief Set fixed payload length on */
|
||||
|
Loading…
Reference in New Issue
Block a user