mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
net/lorawan : Move 'LORAMAC_DEFAULT_TX_PORT' to 'CONFIG_'
This commit is contained in:
parent
3a6c4f2f71
commit
aa3b1da0c4
@ -251,7 +251,7 @@ int rn2xx3_mac_init(rn2xx3_t *dev)
|
||||
{
|
||||
rn2xx3_mac_set_dr(dev, CONFIG_LORAMAC_DEFAULT_DR);
|
||||
rn2xx3_mac_set_tx_power(dev, CONFIG_LORAMAC_DEFAULT_TX_POWER);
|
||||
rn2xx3_mac_set_tx_port(dev, LORAMAC_DEFAULT_TX_PORT);
|
||||
rn2xx3_mac_set_tx_port(dev, CONFIG_LORAMAC_DEFAULT_TX_PORT);
|
||||
rn2xx3_mac_set_tx_mode(dev, LORAMAC_DEFAULT_TX_MODE);
|
||||
rn2xx3_mac_set_adr(dev, LORAMAC_DEFAULT_ADR);
|
||||
rn2xx3_mac_set_retx(dev, LORAMAC_DEFAULT_RETX);
|
||||
|
@ -380,7 +380,7 @@ void _init_loramac(semtech_loramac_t *mac,
|
||||
semtech_loramac_set_adr(mac, LORAMAC_DEFAULT_ADR);
|
||||
semtech_loramac_set_public_network(mac, LORAMAC_DEFAULT_PUBLIC_NETWORK);
|
||||
semtech_loramac_set_class(mac, CONFIG_LORAMAC_DEFAULT_DEVICE_CLASS);
|
||||
semtech_loramac_set_tx_port(mac, LORAMAC_DEFAULT_TX_PORT);
|
||||
semtech_loramac_set_tx_port(mac, CONFIG_LORAMAC_DEFAULT_TX_PORT);
|
||||
semtech_loramac_set_tx_mode(mac, LORAMAC_DEFAULT_TX_MODE);
|
||||
semtech_loramac_set_system_max_rx_error(mac,
|
||||
LORAMAC_DEFAULT_SYSTEM_MAX_RX_ERROR);
|
||||
|
@ -239,8 +239,8 @@ extern "C" {
|
||||
/**
|
||||
* @brief Default MAC TX port (from 1 to 223)
|
||||
*/
|
||||
#ifndef LORAMAC_DEFAULT_TX_PORT
|
||||
#define LORAMAC_DEFAULT_TX_PORT (2U)
|
||||
#ifndef CONFIG_LORAMAC_DEFAULT_TX_PORT
|
||||
#define CONFIG_LORAMAC_DEFAULT_TX_PORT (2U)
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -182,7 +182,7 @@ static void _reset(gnrc_netif_t *netif)
|
||||
netif->lorawan.datarate = CONFIG_LORAMAC_DEFAULT_DR;
|
||||
netif->lorawan.demod_margin = 0;
|
||||
netif->lorawan.num_gateways = 0;
|
||||
netif->lorawan.port = LORAMAC_DEFAULT_TX_PORT;
|
||||
netif->lorawan.port = CONFIG_LORAMAC_DEFAULT_TX_PORT;
|
||||
netif->lorawan.ack_req = LORAMAC_DEFAULT_TX_MODE == LORAMAC_TX_CNF;
|
||||
netif->lorawan.flags = 0;
|
||||
}
|
||||
|
@ -398,7 +398,7 @@ int _loramac_handler(int argc, char **argv)
|
||||
}
|
||||
|
||||
uint8_t cnf = LORAMAC_DEFAULT_TX_MODE; /* Default: confirmable */
|
||||
uint8_t port = LORAMAC_DEFAULT_TX_PORT; /* Default: 2 */
|
||||
uint8_t port = CONFIG_LORAMAC_DEFAULT_TX_PORT; /* Default: 2 */
|
||||
/* handle optional parameters */
|
||||
if (argc > 3) {
|
||||
if (strcmp(argv[3], "cnf") == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user