diff --git a/arch/cpu/cc26xx-cc13xx/cc13xx-cc26xx-conf.h b/arch/cpu/cc26xx-cc13xx/cc13xx-cc26xx-conf.h index 83519f795..9c00a1823 100644 --- a/arch/cpu/cc26xx-cc13xx/cc13xx-cc26xx-conf.h +++ b/arch/cpu/cc26xx-cc13xx/cc13xx-cc26xx-conf.h @@ -54,14 +54,6 @@ #define CC2650_FAST_RADIO_STARTUP (MAC_CONF_WITH_TSCH) #endif -#ifdef RF_CHANNEL -#define RF_CORE_CONF_CHANNEL RF_CHANNEL -#endif - -#ifndef RF_CORE_CONF_CHANNEL -#define RF_CORE_CONF_CHANNEL 25 -#endif - /* Number of Prop Mode RX buffers */ #ifndef PROP_MODE_CONF_RX_BUF_CNT #define PROP_MODE_CONF_RX_BUF_CNT 4 @@ -81,9 +73,10 @@ #if CC13XX_CONF_PROP_MODE #define NETSTACK_CONF_RADIO prop_mode_driver -#ifndef RF_CORE_CONF_CHANNEL -#define RF_CORE_CONF_CHANNEL 0 -#endif +/* Channels count from 0 upwards in IEEE 802.15.4g */ +#ifndef IEEE802154_CONF_DEFAULT_CHANNEL +#define IEEE802154_CONF_DEFAULT_CHANNEL 0 +#endif /* IEEE802154_CONF_DEFAULT_CHANNEL */ #define CSMA_CONF_ACK_WAIT_TIME (RTIMER_SECOND / 400) #define CSMA_CONF_AFTER_ACK_DETECTED_WAIT_TIME (RTIMER_SECOND / 1000) diff --git a/arch/cpu/cc26xx-cc13xx/rf-core/ieee-mode.c b/arch/cpu/cc26xx-cc13xx/rf-core/ieee-mode.c index a5479a4ee..3516147b5 100644 --- a/arch/cpu/cc26xx-cc13xx/rf-core/ieee-mode.c +++ b/arch/cpu/cc26xx-cc13xx/rf-core/ieee-mode.c @@ -610,7 +610,7 @@ init_rf_params(void) cmd->startTime = 0x00000000; cmd->startTrigger.triggerType = TRIG_NOW; cmd->condition.rule = COND_NEVER; - cmd->channel = RF_CORE_CHANNEL; + cmd->channel = IEEE802154_DEFAULT_CHANNEL; cmd->rxConfig.bAutoFlushCrc = 1; cmd->rxConfig.bAutoFlushIgn = 0; diff --git a/arch/cpu/cc26xx-cc13xx/rf-core/prop-mode.c b/arch/cpu/cc26xx-cc13xx/rf-core/prop-mode.c index f9f49e9a0..f4e7f66e7 100644 --- a/arch/cpu/cc26xx-cc13xx/rf-core/prop-mode.c +++ b/arch/cpu/cc26xx-cc13xx/rf-core/prop-mode.c @@ -629,7 +629,7 @@ init(void) smartrf_settings_cmd_prop_rx_adv.pQueue = &rx_data_queue; smartrf_settings_cmd_prop_rx_adv.pOutput = (uint8_t *)&rx_stats; - set_channel(RF_CORE_CHANNEL); + set_channel(IEEE802154_DEFAULT_CHANNEL); if(on() != RF_CORE_CMD_OK) { PRINTF("init: on() failed\n"); diff --git a/arch/cpu/cc26xx-cc13xx/rf-core/rf-core.h b/arch/cpu/cc26xx-cc13xx/rf-core/rf-core.h index 3264cfc01..ac48bc52a 100644 --- a/arch/cpu/cc26xx-cc13xx/rf-core/rf-core.h +++ b/arch/cpu/cc26xx-cc13xx/rf-core/rf-core.h @@ -57,13 +57,6 @@ #include #include /*---------------------------------------------------------------------------*/ -/* The channel to use in IEEE or prop mode. */ -#ifdef RF_CORE_CONF_CHANNEL -#define RF_CORE_CHANNEL RF_CORE_CONF_CHANNEL -#else -#define RF_CORE_CHANNEL 25 -#endif /* RF_CORE_CONF_IEEE_MODE_CHANNEL */ -/*---------------------------------------------------------------------------*/ #define RF_CORE_FRONT_END_MODE_DIFFERENTIAL 0 #define RF_CORE_FRONT_END_MODE_SINGLE_RFP 1 #define RF_CORE_FRONT_END_MODE_SINGLE_RFN 2 diff --git a/arch/platform/srf06-cc26xx/platform.c b/arch/platform/srf06-cc26xx/platform.c index bfda15dad..362b9614e 100644 --- a/arch/platform/srf06-cc26xx/platform.c +++ b/arch/platform/srf06-cc26xx/platform.c @@ -128,7 +128,7 @@ set_rf_params(void) NETSTACK_RADIO.set_value(RADIO_PARAM_PAN_ID, IEEE802154_PANID); NETSTACK_RADIO.set_value(RADIO_PARAM_16BIT_ADDR, short_addr); - NETSTACK_RADIO.set_value(RADIO_PARAM_CHANNEL, RF_CORE_CHANNEL); + NETSTACK_RADIO.set_value(RADIO_PARAM_CHANNEL, IEEE802154_DEFAULT_CHANNEL); NETSTACK_RADIO.set_object(RADIO_PARAM_64BIT_ADDR, ext_addr, 8); /* also set the global node id */ diff --git a/examples/platform-specific/cc26xx/cc26xx-web-demo/project-conf.h b/examples/platform-specific/cc26xx/cc26xx-web-demo/project-conf.h index f007eb403..c69ceb209 100644 --- a/examples/platform-specific/cc26xx/cc26xx-web-demo/project-conf.h +++ b/examples/platform-specific/cc26xx/cc26xx-web-demo/project-conf.h @@ -33,7 +33,7 @@ /*---------------------------------------------------------------------------*/ /* Change to match your configuration */ #define IEEE802154_CONF_PANID 0xABCD -#define RF_CORE_CONF_CHANNEL 25 +#define IEEE802154_CONF_DEFAULT_CHANNEL 25 #define RF_BLE_CONF_ENABLED 1 /*---------------------------------------------------------------------------*/ diff --git a/examples/platform-specific/cc26xx/project-conf.h b/examples/platform-specific/cc26xx/project-conf.h index 8231dd4ea..17bd2ce29 100644 --- a/examples/platform-specific/cc26xx/project-conf.h +++ b/examples/platform-specific/cc26xx/project-conf.h @@ -36,7 +36,7 @@ /*---------------------------------------------------------------------------*/ /* Change to match your configuration */ #define IEEE802154_CONF_PANID 0xABCD -#define RF_CORE_CONF_CHANNEL 25 +#define IEEE802154_CONF_DEFAULT_CHANNEL 25 #define RF_BLE_CONF_ENABLED 1 /*---------------------------------------------------------------------------*/ #endif /* PROJECT_CONF_H_ */ diff --git a/examples/platform-specific/cc26xx/very-sleepy-demo/project-conf.h b/examples/platform-specific/cc26xx/very-sleepy-demo/project-conf.h index b60df036d..f22fb2685 100644 --- a/examples/platform-specific/cc26xx/very-sleepy-demo/project-conf.h +++ b/examples/platform-specific/cc26xx/very-sleepy-demo/project-conf.h @@ -33,7 +33,7 @@ /*---------------------------------------------------------------------------*/ /* Change to match your configuration */ #define IEEE802154_CONF_PANID 0xABCD -#define RF_CORE_CONF_CHANNEL 25 +#define IEEE802154_CONF_DEFAULT_CHANNEL 25 /*---------------------------------------------------------------------------*/ /* Enable the ROM bootloader */