diff --git a/arch/cpu/cc13xx-cc26xx/Makefile.cc13xx-cc26xx b/arch/cpu/cc13xx-cc26xx/Makefile.cc13xx-cc26xx index 083bf3f88..558ad4655 100644 --- a/arch/cpu/cc13xx-cc26xx/Makefile.cc13xx-cc26xx +++ b/arch/cpu/cc13xx-cc26xx/Makefile.cc13xx-cc26xx @@ -74,8 +74,8 @@ CONTIKI_CPU_SOURCEFILES += batmon-sensor.c gpio-hal-arch.c CONTIKI_CPU_SOURCEFILES += int-master-arch.c ### RF source files -CONTIKI_CPU_SOURCEFILES += rf-core.c rf-data-queue.c -CONTIKI_CPU_SOURCEFILES += ieee-addr.c ble-addr.c +CONTIKI_CPU_SOURCEFILES += rf-sched.c rf-data-queue.c +CONTIKI_CPU_SOURCEFILES += rf-ieee-addr.c rf-ble-addr.c CONTIKI_CPU_SOURCEFILES += rf-ble-beacond.c ifeq ($(SUPPORTS_PROP_MODE),1) diff --git a/arch/cpu/cc13xx-cc26xx/cc13xx-cc26xx-conf.h b/arch/cpu/cc13xx-cc26xx/cc13xx-cc26xx-conf.h index 12ca00313..09c93bdf5 100644 --- a/arch/cpu/cc13xx-cc26xx/cc13xx-cc26xx-conf.h +++ b/arch/cpu/cc13xx-cc26xx/cc13xx-cc26xx-conf.h @@ -38,8 +38,8 @@ * Edvard Pettersen */ /*---------------------------------------------------------------------------*/ -#ifndef SIMPLELINK_CONF_H_ -#define SIMPLELINK_CONF_H_ +#ifndef CC13XX_CC26XX_CONF_H_ +#define CC13XX_CC26XX_CONF_H_ /*---------------------------------------------------------------------------*/ #include "cc13xx-cc26xx-def.h" @@ -390,6 +390,6 @@ #endif /* SLIP_ARCH_CONF_ENABLED */ /** @} */ /*---------------------------------------------------------------------------*/ -#endif /* SIMPLELINK_CONF_H_ */ +#endif /* CC13XX_CC26XX_CONF_H_ */ /*---------------------------------------------------------------------------*/ /** @} */ diff --git a/arch/cpu/cc13xx-cc26xx/dev/dot-15-4g.h b/arch/cpu/cc13xx-cc26xx/dev/rf-15-4g.h similarity index 100% rename from arch/cpu/cc13xx-cc26xx/dev/dot-15-4g.h rename to arch/cpu/cc13xx-cc26xx/dev/rf-15-4g.h diff --git a/arch/cpu/cc13xx-cc26xx/dev/ble-addr.c b/arch/cpu/cc13xx-cc26xx/dev/rf-ble-addr.c similarity index 97% rename from arch/cpu/cc13xx-cc26xx/dev/ble-addr.c rename to arch/cpu/cc13xx-cc26xx/dev/rf-ble-addr.c index 11f4adf63..a76261c66 100644 --- a/arch/cpu/cc13xx-cc26xx/dev/ble-addr.c +++ b/arch/cpu/cc13xx-cc26xx/dev/rf-ble-addr.c @@ -37,19 +37,18 @@ */ /*---------------------------------------------------------------------------*/ #include "contiki.h" - #include "dev/ble-hal.h" #include "net/linkaddr.h" -#include "ble-addr.h" - -#include +#include "rf-ble-addr.h" /*---------------------------------------------------------------------------*/ #include #include DeviceFamily_constructPath(inc/hw_memmap.h) #include DeviceFamily_constructPath(inc/hw_fcfg1.h) #include DeviceFamily_constructPath(inc/hw_ccfg.h) /*---------------------------------------------------------------------------*/ +#include +/*---------------------------------------------------------------------------*/ #define BLE_MAC_PRIMARY_ADDRESS (FCFG1_BASE + FCFG1_O_MAC_BLE_0) #define BLE_MAC_SECONDARY_ADDRESS (CCFG_BASE + CCFG_O_IEEE_BLE_0) /*---------------------------------------------------------------------------*/ diff --git a/arch/cpu/cc13xx-cc26xx/dev/ble-addr.h b/arch/cpu/cc13xx-cc26xx/dev/rf-ble-addr.h similarity index 100% rename from arch/cpu/cc13xx-cc26xx/dev/ble-addr.h rename to arch/cpu/cc13xx-cc26xx/dev/rf-ble-addr.h diff --git a/arch/cpu/cc13xx-cc26xx/dev/rf-ble-beacond.c b/arch/cpu/cc13xx-cc26xx/dev/rf-ble-beacond.c index 442bd979a..7aa38198a 100644 --- a/arch/cpu/cc13xx-cc26xx/dev/rf-ble-beacond.c +++ b/arch/cpu/cc13xx-cc26xx/dev/rf-ble-beacond.c @@ -44,8 +44,6 @@ #include "sys/etimer.h" #include "net/netstack.h" #include "net/linkaddr.h" - -#include "rf-ble-beacond.h" /*---------------------------------------------------------------------------*/ #include #include DeviceFamily_constructPath(driverlib/chipinfo.h) @@ -54,9 +52,10 @@ #include /*---------------------------------------------------------------------------*/ -#include "netstack-settings.h" +#include "rf-ble-addr.h" +#include "rf-ble-beacond.h" #include "rf-core.h" -#include "ble-addr.h" +#include "rf-settings.h" /*---------------------------------------------------------------------------*/ #include #include diff --git a/arch/cpu/cc13xx-cc26xx/dev/rf-core.h b/arch/cpu/cc13xx-cc26xx/dev/rf-core.h index fa27ebf62..6237779cd 100644 --- a/arch/cpu/cc13xx-cc26xx/dev/rf-core.h +++ b/arch/cpu/cc13xx-cc26xx/dev/rf-core.h @@ -27,64 +27,40 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ -/*---------------------------------------------------------------------------*/ /** - * \addtogroup simplelink + * \addtogroup cc13xx-cc26xx-cpu * @{ * - * \defgroup rf-common Common functionality fpr the CC13xx/CC26xx RF + * \defgroup rf-core Common functionality for the CC13xx/CC26xx RF * * @{ * * \file - * Header file of common CC13xx/CC26xx RF functionality + * Header file of common CC13xx/CC26xx RF functionality + * \author + * Edvard Pettersen + */ /*---------------------------------------------------------------------------*/ #ifndef RF_CORE_H_ #define RF_CORE_H_ /*---------------------------------------------------------------------------*/ -#include "contiki.h" -#include "sys/process.h" - -#include "rf-ble-beacond.h" -/*---------------------------------------------------------------------------*/ -#include -/*---------------------------------------------------------------------------*/ -#include -/*---------------------------------------------------------------------------*/ +/** + * \name Different modes the RF can operate on, denoted by which frequency + * band said mode operates on. Currently supports the following modes: + * - Sub-1 GHz, called prop-mode + * - 2.4 GHz, called ieee-mode + * + * @{ + */ #define RF_MODE_SUB_1_GHZ (1 << 0) #define RF_MODE_2_4_GHZ (1 << 1) +/* Bitmask of supported RF modes */ #define RF_MODE_BM ( RF_MODE_SUB_1_GHZ \ | RF_MODE_2_4_GHZ \ ) -/*---------------------------------------------------------------------------*/ -PROCESS_NAME(rf_core_process); -/*---------------------------------------------------------------------------*/ -typedef enum { - RF_RESULT_OK = 0, - RF_RESULT_ERROR, -} rf_result_t; -/*---------------------------------------------------------------------------*/ -/* Common */ -rf_result_t rf_yield(void); - -rf_result_t rf_set_tx_power(RF_Handle handle, RF_TxPowerTable_Entry *table, int8_t dbm); -rf_result_t rf_get_tx_power(RF_Handle handle, RF_TxPowerTable_Entry *table, int8_t *dbm); -/*---------------------------------------------------------------------------*/ -/* Netstack radio: IEEE-mode or prop-mode */ -RF_Handle netstack_open(RF_Params *params); - -rf_result_t netstack_sched_fs(void); -rf_result_t netstack_sched_ieee_tx(bool recieve_ack); -rf_result_t netstack_sched_prop_tx(void); -rf_result_t netstack_sched_rx(bool start); -rf_result_t netstack_stop_rx(void); -/*---------------------------------------------------------------------------*/ -/* BLE radio: BLE Beacon Daemon */ -RF_Handle ble_open(RF_Params *params); - -rf_result_t ble_sched_beacon(RF_Callback cb, RF_EventMask bm_event); +/** @} */ /*---------------------------------------------------------------------------*/ #endif /* RF_CORE_H_ */ /*---------------------------------------------------------------------------*/ diff --git a/arch/cpu/cc13xx-cc26xx/dev/ieee-addr.c b/arch/cpu/cc13xx-cc26xx/dev/rf-ieee-addr.c similarity index 99% rename from arch/cpu/cc13xx-cc26xx/dev/ieee-addr.c rename to arch/cpu/cc13xx-cc26xx/dev/rf-ieee-addr.c index 3d9b4c9f8..eddee8947 100644 --- a/arch/cpu/cc13xx-cc26xx/dev/ieee-addr.c +++ b/arch/cpu/cc13xx-cc26xx/dev/rf-ieee-addr.c @@ -40,7 +40,7 @@ #include "contiki.h" #include "net/linkaddr.h" -#include "ieee-addr.h" +#include "rf-ieee-addr.h" /*---------------------------------------------------------------------------*/ #include #include DeviceFamily_constructPath(inc/hw_memmap.h) diff --git a/arch/cpu/cc13xx-cc26xx/dev/ieee-addr.h b/arch/cpu/cc13xx-cc26xx/dev/rf-ieee-addr.h similarity index 100% rename from arch/cpu/cc13xx-cc26xx/dev/ieee-addr.h rename to arch/cpu/cc13xx-cc26xx/dev/rf-ieee-addr.h diff --git a/arch/cpu/cc13xx-cc26xx/dev/rf-ieee-mode.c b/arch/cpu/cc13xx-cc26xx/dev/rf-ieee-mode.c index 60c806d24..ce7d8b42c 100644 --- a/arch/cpu/cc13xx-cc26xx/dev/rf-ieee-mode.c +++ b/arch/cpu/cc13xx-cc26xx/dev/rf-ieee-mode.c @@ -68,9 +68,9 @@ /* SimpleLink Platform RF dev */ #include "rf-data-queue.h" #include "rf-core.h" -#include "dot-15-4g.h" -#include "netstack-settings.h" -#include RF_IEEE_SETTINGS +#include "rf-sched.h" +#include "rf-15-4g.h" +#include "ieee-settings.h" /*---------------------------------------------------------------------------*/ #include #include @@ -428,7 +428,7 @@ init(void) ctimer_set(&ieee_radio.rat.overflow_timer, two_quarters, rat_overflow_cb, NULL); /* Start RF process */ - process_start(&rf_core_process, NULL); + process_start(&rf_sched_process, NULL); return RF_RESULT_OK; } @@ -671,7 +671,7 @@ pending_packet(void) } while (curr_entry != read_entry); if ((num_pending > 0) && !ieee_radio.poll_mode) { - process_poll(&rf_core_process); + process_poll(&rf_sched_process); } /* If we didn't find an entry at status finished or busy, no frames are pending */ diff --git a/arch/cpu/cc13xx-cc26xx/dev/rf-prop-mode.c b/arch/cpu/cc13xx-cc26xx/dev/rf-prop-mode.c index 2451bd0e7..02d48bc21 100644 --- a/arch/cpu/cc13xx-cc26xx/dev/rf-prop-mode.c +++ b/arch/cpu/cc13xx-cc26xx/dev/rf-prop-mode.c @@ -297,15 +297,19 @@ set_channel(uint16_t channel) static uint8_t calculate_lqi(int8_t rssi) { - /* Note : Currently the LQI value is simply the energy detect measurement. + /* + * Note : Currently the LQI value is simply the energy detect measurement. * A more accurate value could be derived by using the correlation - * value along with the RSSI value. */ + * value along with the RSSI value. + */ rssi = CLAMP(rssi, ED_RF_POWER_MIN_DBM, ED_RF_POWER_MAX_DBM); - /* Create energy detect measurement by normalizing and scaling RF power level. + /* + * Create energy detect measurement by normalizing and scaling RF power level. * Note : The division operation below is designed for maximum accuracy and - * best granularity. This is done by grouping the math operations to - * compute the entire numerator before doing any division. */ + * best granularity. This is done by grouping the math operations to + * compute the entire numerator before doing any division. + */ return (MAC_SPEC_ED_MAX * (rssi - ED_RF_POWER_MIN_DBM)) / (ED_RF_POWER_MAX_DBM - ED_RF_POWER_MIN_DBM); } /*---------------------------------------------------------------------------*/ diff --git a/arch/cpu/cc13xx-cc26xx/dev/rf-core.c b/arch/cpu/cc13xx-cc26xx/dev/rf-sched.c similarity index 96% rename from arch/cpu/cc13xx-cc26xx/dev/rf-core.c rename to arch/cpu/cc13xx-cc26xx/dev/rf-sched.c index 027552631..a258dc54b 100644 --- a/arch/cpu/cc13xx-cc26xx/dev/rf-core.c +++ b/arch/cpu/cc13xx-cc26xx/dev/rf-sched.c @@ -27,9 +27,8 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ -/*---------------------------------------------------------------------------*/ /** - * \addtogroup simplelink + * \addtogroup * @{ * * \file @@ -46,7 +45,6 @@ #include "net/packetbuf.h" #include "net/mac/mac.h" -#include "rf-core.h" /*---------------------------------------------------------------------------*/ #include #include DeviceFamily_constructPath(driverlib/rf_common_cmd.h) @@ -54,8 +52,10 @@ #include /*---------------------------------------------------------------------------*/ +#include "rf-core.h" +#include "rf-sched.h" #include "rf-data-queue.h" -#include "netstack-settings.h" +#include "rf-settings.h" /*---------------------------------------------------------------------------*/ #include #include @@ -100,13 +100,13 @@ cmd_rx_cb(RF_Handle client, RF_CmdHandle command, RF_EventMask events) (void)command; if (events & RF_EventRxEntryDone) { - process_poll(&rf_core_process); + process_poll(&rf_sched_process); } if (events & RF_EventRxBufFull) { rx_buf_full = true; - process_poll(&rf_core_process); + process_poll(&rf_sched_process); } } /*---------------------------------------------------------------------------*/ @@ -275,7 +275,7 @@ netstack_sched_fs(void) } /*---------------------------------------------------------------------------*/ rf_result_t -netstack_sched_ieee_tx(bool recieve_ack) +netstack_sched_ieee_tx(bool ack_request) { rf_result_t res; @@ -286,15 +286,15 @@ netstack_sched_ieee_tx(bool recieve_ack) sched_params.endTime = 0; sched_params.allowDelay = RF_AllowDelayAny; - const bool is_active = cmd_rx_is_active(); - const bool rx_ack_required = (recieve_ack && !is_active); + const bool rx_is_active = cmd_rx_is_active(); + const bool rx_needed = (ack_request && !rx_is_active); /* * If we expect ACK after transmission, RX must be running to be able to * run the RX_ACK command. Therefore, turn on RX before starting the * chained TX command. */ - if (rx_ack_required) { + if (rx_needed) { res = netstack_sched_rx(false); if (res != RF_RESULT_OK) { return res; @@ -316,7 +316,7 @@ netstack_sched_ieee_tx(bool recieve_ack) return RF_RESULT_ERROR; } - if (is_active) { + if (rx_is_active) { ENERGEST_SWITCH(ENERGEST_TYPE_LISTEN, ENERGEST_TYPE_TRANSMIT); } else { ENERGEST_ON(ENERGEST_TYPE_TRANSMIT); @@ -326,11 +326,11 @@ netstack_sched_ieee_tx(bool recieve_ack) RF_EventMask tx_events = RF_pendCmd(&rf_netstack, tx_handle, 0); /* Stop RX if it was turned on only for ACK */ - if (rx_ack_required) { + if (rx_needed) { netstack_stop_rx(); } - if (is_active) { + if (rx_is_active) { ENERGEST_SWITCH(ENERGEST_TYPE_TRANSMIT, ENERGEST_TYPE_LISTEN); } else { ENERGEST_OFF(ENERGEST_TYPE_TRANSMIT); @@ -436,7 +436,7 @@ netstack_sched_rx(bool start) if (start) { rf_is_on = true; - process_poll(&rf_core_process); + process_poll(&rf_sched_process); } return RF_RESULT_OK; @@ -508,9 +508,9 @@ ble_sched_beacon(RF_Callback cb, RF_EventMask bm_event) return RF_RESULT_OK; } /*---------------------------------------------------------------------------*/ -PROCESS(rf_core_process, "RF Core Process"); +PROCESS(rf_sched_process, "RF Core Process"); /*---------------------------------------------------------------------------*/ -PROCESS_THREAD(rf_core_process, ev, data) +PROCESS_THREAD(rf_sched_process, ev, data) { int len; diff --git a/arch/cpu/cc13xx-cc26xx/dev/rf-sched.h b/arch/cpu/cc13xx-cc26xx/dev/rf-sched.h new file mode 100644 index 000000000..32f6f0a6b --- /dev/null +++ b/arch/cpu/cc13xx-cc26xx/dev/rf-sched.h @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2018, Texas Instruments Incorporated - http://www.ti.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + */ +/** + * \addtogroup rf-core + * @{ + * + * \file + * Header file of the CC13xx/CC26xx RF scheduler. + */ +/*---------------------------------------------------------------------------*/ +#ifndef RF_SCHED_H_ +#define RF_SCHED_H_ +/*---------------------------------------------------------------------------*/ +#include "contiki.h" +#include "sys/process.h" + +#include "rf-ble-beacond.h" +/*---------------------------------------------------------------------------*/ +#include +/*---------------------------------------------------------------------------*/ +#include +/*---------------------------------------------------------------------------*/ +PROCESS_NAME(rf_sched_process); +/*---------------------------------------------------------------------------*/ +typedef enum { + RF_RESULT_OK = 0, + RF_RESULT_ERROR, +} rf_result_t; +/*---------------------------------------------------------------------------*/ +/* Common */ +rf_result_t rf_yield(void); + +rf_result_t rf_set_tx_power(RF_Handle handle, RF_TxPowerTable_Entry *table, int8_t dbm); +rf_result_t rf_get_tx_power(RF_Handle handle, RF_TxPowerTable_Entry *table, int8_t *dbm); +/*---------------------------------------------------------------------------*/ +/* Netstack radio: IEEE-mode or prop-mode */ +RF_Handle netstack_open(RF_Params *params); + +rf_result_t netstack_sched_fs(void); +rf_result_t netstack_sched_ieee_tx(bool ack_request); +rf_result_t netstack_sched_prop_tx(void); +rf_result_t netstack_sched_rx(bool start); +rf_result_t netstack_stop_rx(void); +/*---------------------------------------------------------------------------*/ +/* BLE radio: BLE Beacon Daemon */ +RF_Handle ble_open(RF_Params *params); + +rf_result_t ble_sched_beacon(RF_Callback cb, RF_EventMask bm_event); +/*---------------------------------------------------------------------------*/ +#endif /* RF_SCHED_H_ */ +/*---------------------------------------------------------------------------*/ +/** + * @} + * @} + */ diff --git a/arch/cpu/cc13xx-cc26xx/dev/startup_cc13xx_cc26xx_gcc.c b/arch/cpu/cc13xx-cc26xx/dev/startup_cc13xx_cc26xx_gcc.c index 6efdf5569..869414920 100644 --- a/arch/cpu/cc13xx-cc26xx/dev/startup_cc13xx_cc26xx_gcc.c +++ b/arch/cpu/cc13xx-cc26xx/dev/startup_cc13xx_cc26xx_gcc.c @@ -107,10 +107,6 @@ static void (* const resetVectors[16])(void) = defaultHandler, // The PendSV handler defaultHandler // The SysTick handler }; - -__attribute__ ((section(".ramVecs"))) -static unsigned long ramVectors[50]; - //***************************************************************************** // // The following are arrays of pointers to constructor functions that need to @@ -194,14 +190,6 @@ void localProgramStart(void) __init_array_start[i](); } - /* Copy from reset vector table into RAM vector table */ - memcpy(ramVectors, resetVectors, 16*4); - - /* fill remaining vectors with default handler */ - for (i=16; i < 50; i++) { - ramVectors[i] = (unsigned long)defaultHandler; - } - /* Call the application's entry point. */ main(); diff --git a/arch/cpu/cc13xx-cc26xx/rf-settings/netstack-settings.h b/arch/cpu/cc13xx-cc26xx/rf-settings/rf-settings.h similarity index 86% rename from arch/cpu/cc13xx-cc26xx/rf-settings/netstack-settings.h rename to arch/cpu/cc13xx-cc26xx/rf-settings/rf-settings.h index 03bcfe2bb..198482b1f 100644 --- a/arch/cpu/cc13xx-cc26xx/rf-settings/netstack-settings.h +++ b/arch/cpu/cc13xx-cc26xx/rf-settings/rf-settings.h @@ -35,31 +35,10 @@ /*---------------------------------------------------------------------------*/ #include /*---------------------------------------------------------------------------*/ -/* Prop-mode RF settings configuration */ -#ifdef RF_CONF_PROP_SETTINGS -# define RF_PROP_SETTINGS RF_CONF_PROP_SETTINGS -#else -# define RF_PROP_SETTINGS "prop-settings.h" -#endif - -/* IEEE-mode RF settings configuration */ -#ifdef RF_CONF_IEEE_SETTINGS -# define RF_IEEE_SETTINGS RF_CONF_IEEE_SETTINGS -#else -# define RF_IEEE_SETTINGS "ieee-settings.h" -#endif - -/* BLE RF settings configuration */ -#ifdef RF_CONF_BLE_SETTINGS -# define RF_BLE_SETTINGS RF_CONF_BLE_SETTINGS -#else -# define RF_BLE_SETTINGS "ble-settings.h" -#endif -/*---------------------------------------------------------------------------*/ /* Prop-mode RF settings */ #if (RF_MODE == RF_MODE_SUB_1_GHZ) -#include RF_PROP_SETTINGS +#include "prop-settings.h" #define netstack_mode rf_prop_mode #define netstack_cmd_radio_setup rf_cmd_prop_radio_div_setup @@ -70,7 +49,7 @@ /* IEEE-mode RF settings */ #elif (RF_MODE == RF_MODE_2_4_GHZ) -#include RF_IEEE_SETTINGS +#include "ieee-settings.h" #define netstack_mode rf_ieee_mode #define netstack_cmd_radio_setup rf_cmd_ieee_radio_setup @@ -83,22 +62,27 @@ #endif /*---------------------------------------------------------------------------*/ /* BLE RF settings */ -#include RF_BLE_SETTINGS #if (DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X0_CC26X0) +#include "ble-settings.h" + #define ble_mode rf_ble_mode #define ble_cmd_radio_setup rf_ble_cmd_radio_setup #define ble_adv_par rf_ble_adv_par #define ble_cmd_beacon rf_ble_cmd_ble_adv_nc +/*---------------------------------------------------------------------------*/ #elif (DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X2_CC26X2) +#include "ble-settings.h" + #define ble_mode rf_ble_mode #define ble_cmd_radio_setup rf_cmd_ble5_radio_setup #define ble_adv_par rf_ble5_adv_aux_par #define ble_cmd_beacon rf_cmd_ble5_adv_aux +/*---------------------------------------------------------------------------*/ #else # error "Unsupported DeviceFamily_PARENT for BLE settings" #endif diff --git a/arch/platform/simplelink/cc13xx-cc26xx/platform.c b/arch/platform/simplelink/cc13xx-cc26xx/platform.c index 86342a287..64317dc02 100644 --- a/arch/platform/simplelink/cc13xx-cc26xx/platform.c +++ b/arch/platform/simplelink/cc13xx-cc26xx/platform.c @@ -72,13 +72,13 @@ #include /*---------------------------------------------------------------------------*/ /* Arch driver implementations */ +#include "button-sensor.h" #include "board-peripherals.h" #include "uart0-arch.h" /*---------------------------------------------------------------------------*/ -#include "ieee-addr.h" #include "rf-core.h" +#include "rf-ieee-addr.h" #include "rf-ble-beacond.h" -#include "button-sensor.h" /*---------------------------------------------------------------------------*/ #include #include