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

Merge pull request #17517 from aabadie/pr/sys/lora_remove_deprecated_define

sys/lora: remove deprecated LORA_PAYLOAD_CRC_ON_DEFAULT define
This commit is contained in:
Francisco 2022-01-17 11:09:00 +01:00 committed by GitHub
commit 54d62f1303
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 12 deletions

View File

@ -132,7 +132,7 @@ static void sx126x_init_default_config(sx126x_t *dev)
sx126x_set_lora_mod_params(dev, &dev->mod_params);
dev->pkt_params.pld_len_in_bytes = 0;
dev->pkt_params.crc_is_on = LORA_PAYLOAD_CRC_ON_DEFAULT;
dev->pkt_params.crc_is_on = !IS_ACTIVE(CONFIG_LORA_PAYLOAD_CRC_OFF_DEFAULT);
dev->pkt_params.header_type = (
IS_ACTIVE(CONFIG_LORA_FIXED_HEADER_LEN_MODE_DEFAULT) ? true : false
);

View File

@ -179,7 +179,7 @@ void sx127x_init_radio_settings(sx127x_t *dev)
sx127x_set_bandwidth(dev, CONFIG_LORA_BW_DEFAULT);
sx127x_set_spreading_factor(dev, CONFIG_LORA_SF_DEFAULT);
sx127x_set_coding_rate(dev, CONFIG_LORA_CR_DEFAULT);
sx127x_set_crc(dev, LORA_PAYLOAD_CRC_ON_DEFAULT);
sx127x_set_crc(dev, !IS_ACTIVE(CONFIG_LORA_PAYLOAD_CRC_OFF_DEFAULT));
sx127x_set_freq_hop(dev, IS_ACTIVE(CONFIG_LORA_FREQUENCY_HOPPING_DEFAULT) ? true : false);
sx127x_set_hop_period(dev, CONFIG_LORA_FREQUENCY_HOPPING_PERIOD_DEFAULT);
sx127x_set_fixed_header_len_mode(dev, IS_ACTIVE(CONFIG_LORA_FIXED_HEADER_LEN_MODE_DEFAULT) ?

View File

@ -177,17 +177,11 @@ extern "C" {
#define CONFIG_LORA_FIXED_HEADER_LEN_MODE_DEFAULT
#endif
/** @brief Enable/disable payload CRC, optional
*
* @deprecated Use inverse `CONFIG_LORA_PAYLOAD_CRC_OFF_DEFAULT` instead.
* Will be removed after 2021.04 release.
/**
* @brief Enable/disable payload CRC, optional
*/
#ifndef LORA_PAYLOAD_CRC_ON_DEFAULT
#if IS_ACTIVE(CONFIG_LORA_PAYLOAD_CRC_OFF_DEFAULT)
#define LORA_PAYLOAD_CRC_ON_DEFAULT (false)
#else
#define LORA_PAYLOAD_CRC_ON_DEFAULT (true)
#endif
#ifdef DOXYGEN
#define CONFIG_LORA_PAYLOAD_CRC_OFF_DEFAULT
#endif
/** @brief Configure payload length