drivers/rn2xx3 : r/LORAMAC_DEFAULT_AR/CONFIG_RN2XX3_DEFAULT_AR

Move 'LORAMAC_DEFAULT_AR' to drivers/rn2xx3 i.e
'RN2XX3_DEFAULT_AR'
Move 'RN2XX3_DEFAULT_AR' to 'CONFIG_' namespace

Co-authored-by: Leandro Lanzieri <leandro.lanzieri@haw-hamburg.de>
This commit is contained in:
Akshai M 2020-12-07 16:26:06 +01:00
parent f74cb053b2
commit bfd3a903fb
3 changed files with 20 additions and 8 deletions

View File

@ -67,6 +67,23 @@ extern "C" {
#ifndef CONFIG_RN2XX3_DEFAULT_SLEEP
#define CONFIG_RN2XX3_DEFAULT_SLEEP (5000U)
#endif
/**
* @brief Default automatic reply status
*
* Set to 1 to enable the automatic reply. The module will transmit a packet without a
* payload immediately after a confirmed downlink is received, or when the Frame
* Pending bit has been set by the server.
*
* @note If all enabled channels are busy due to duty cycle limitations, the
* module will wait for the first channel that will become free to transmit. The
* user will not be able to initiate uplink transmissions until the automatic
* transmissions are done. Refer RN2483 LoRa Technology Module Command
* Reference Users Guide for more information.
*/
#ifdef DOXYGEN
#define CONFIG_RN2XX3_DEFAULT_AR
#endif
/** @} */
#if defined(MODULE_RN2903)

View File

@ -24,6 +24,8 @@
#include "assert.h"
#include "xtimer.h"
#include "fmt.h"
#include "kernel_defines.h"
#include "rn2xx3_params.h"
#include "rn2xx3.h"
#include "rn2xx3_internal.h"
@ -255,7 +257,7 @@ int rn2xx3_mac_init(rn2xx3_t *dev)
rn2xx3_mac_set_retx(dev, LORAMAC_DEFAULT_RETX);
rn2xx3_mac_set_linkchk_interval(dev, LORAMAC_DEFAULT_LINKCHK);
rn2xx3_mac_set_rx1_delay(dev, LORAMAC_DEFAULT_RX1_DELAY);
rn2xx3_mac_set_ar(dev, LORAMAC_DEFAULT_AR);
rn2xx3_mac_set_ar(dev, IS_ACTIVE(CONFIG_RN2XX3_DEFAULT_AR));
rn2xx3_mac_set_rx2_dr(dev, LORAMAC_DEFAULT_RX2_DR);
rn2xx3_mac_set_rx2_freq(dev, LORAMAC_DEFAULT_RX2_FREQ);

View File

@ -202,13 +202,6 @@ extern "C" {
*/
#define LORAMAC_DEFAULT_RX2_DELAY (1000U + LORAMAC_DEFAULT_RX1_DELAY)
/**
* @brief Default automatic reply status
*/
#ifndef LORAMAC_DEFAULT_AR
#define LORAMAC_DEFAULT_AR (false)
#endif
/**
* @brief Default second RX window datarate index
*/