2018-02-05 16:18:08 +00:00
|
|
|
/*
|
2018-02-06 14:18:07 +00:00
|
|
|
* Copyright (c) 2017, George Oikonomou - http://www.spd.gr
|
2018-02-05 16:18:08 +00:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
2018-02-06 14:18:07 +00:00
|
|
|
*
|
2018-02-05 16:18:08 +00:00
|
|
|
* 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.
|
|
|
|
*/
|
2018-02-06 14:18:07 +00:00
|
|
|
/*---------------------------------------------------------------------------*/
|
2018-02-05 16:18:08 +00:00
|
|
|
/**
|
2018-05-31 15:17:07 +00:00
|
|
|
* \addtogroup cc13xx-cc26xx
|
2018-02-05 16:18:08 +00:00
|
|
|
* @{
|
|
|
|
*
|
2018-02-06 14:18:07 +00:00
|
|
|
* \file
|
|
|
|
* Header with configuration defines common to all CC13xx/CC26xx platforms
|
|
|
|
*/
|
|
|
|
/*---------------------------------------------------------------------------*/
|
2018-02-06 15:46:25 +00:00
|
|
|
#ifndef SIMPLELINK_CONF_H_
|
|
|
|
#define SIMPLELINK_CONF_H_
|
2018-02-06 14:18:07 +00:00
|
|
|
/*---------------------------------------------------------------------------*/
|
2018-05-31 15:17:07 +00:00
|
|
|
#include "cc13xx-cc26xx-def.h"
|
|
|
|
/*---------------------------------------------------------------------------*/
|
2018-06-29 17:03:17 +00:00
|
|
|
|
|
|
|
#define GPIO_HAL_CONF_ARCH_SW_TOGGLE 0
|
|
|
|
#define GPIO_HAL_CONF_ARCH_HDR_PATH "dev/gpio-hal-arch.h"
|
|
|
|
|
2018-02-06 14:18:07 +00:00
|
|
|
/**
|
|
|
|
* \name Network Stack Configuration
|
2018-02-05 16:18:08 +00:00
|
|
|
*
|
|
|
|
* @{
|
2018-02-06 14:18:07 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* If set, the systems keeps the HF crystal oscillator on even when the radio is off.
|
|
|
|
* You need to set this to 1 to use TSCH with its default 2.2ms or larger guard time.
|
|
|
|
*/
|
|
|
|
#ifndef CC2650_FAST_RADIO_STARTUP
|
2018-05-31 15:17:07 +00:00
|
|
|
#define CC2650_FAST_RADIO_STARTUP (MAC_CONF_WITH_TSCH)
|
2018-02-06 14:18:07 +00:00
|
|
|
#endif
|
|
|
|
|
2018-06-29 17:03:17 +00:00
|
|
|
#define RF_CORE_MODE_SUB_1_GHZ (1 << 0)
|
|
|
|
#define RF_CORE_MODE_2_4_GHZ (1 << 1)
|
|
|
|
|
|
|
|
#define RF_CORE_MODE_MASK ( RF_CORE_MODE_SUB_1_GHZ \
|
|
|
|
| RF_CORE_MODE_2_4_GHZ \
|
|
|
|
)
|
|
|
|
|
|
|
|
/* Default RF mode is 2.4 GHz */
|
|
|
|
#ifdef RF_CORE_CONF_MODE
|
|
|
|
# if !(RF_CORE_CONF_MODE & RF_CORE_MODE_MASK)
|
|
|
|
# error "Invalid RF_CORE_CONF_MODE"
|
|
|
|
# endif
|
|
|
|
# define RF_CORE_MODE RF_CORE_CONF_MODE
|
|
|
|
#else
|
|
|
|
# define RF_CORE_MODE RF_CORE_MODE_2_4_GHZ
|
|
|
|
#endif
|
|
|
|
|
2018-06-15 14:37:51 +00:00
|
|
|
#ifdef RF_CORE_CONF_CHANNEL
|
2018-06-29 17:03:17 +00:00
|
|
|
# define RF_CHANNEL RF_CORE_CONF_CHANNEL
|
2018-06-15 14:37:51 +00:00
|
|
|
#else
|
2018-06-29 17:03:17 +00:00
|
|
|
# define RF_CHANNEL 25
|
2018-02-06 14:18:07 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Number of Prop Mode RX buffers */
|
|
|
|
#ifndef PROP_MODE_CONF_RX_BUF_CNT
|
2018-05-31 15:17:07 +00:00
|
|
|
#define PROP_MODE_CONF_RX_BUF_CNT 4
|
2018-02-06 14:18:07 +00:00
|
|
|
#endif
|
|
|
|
|
2018-05-31 15:17:07 +00:00
|
|
|
/* Configure Radio mode, i.e. prop or ieee */
|
2018-06-15 14:37:51 +00:00
|
|
|
|
|
|
|
/*----- CC13xx Device Line --------------------------------------------------*/
|
2018-05-31 15:17:07 +00:00
|
|
|
/* CC13xx supports both IEEE and Prop mode, depending on which device */
|
|
|
|
#if defined(DEVICE_LINE_CC13XX)
|
2018-02-06 14:18:07 +00:00
|
|
|
|
2018-06-29 17:03:17 +00:00
|
|
|
# if (RF_CORE_MODE == RF_CORE_MODE_SUB_1_GHZ) && (SUPPORTS_PROP_MODE)
|
2018-05-31 15:17:07 +00:00
|
|
|
/*----- CC13xx Prop Mode ----------------------------------------------------*/
|
2018-06-15 14:37:51 +00:00
|
|
|
# define NETSTACK_CONF_RADIO prop_mode_driver
|
2018-05-31 15:17:07 +00:00
|
|
|
|
2018-06-15 14:37:51 +00:00
|
|
|
# define CSMA_CONF_ACK_WAIT_TIME (RTIMER_SECOND / 300)
|
|
|
|
# define CSMA_CONF_AFTER_ACK_DETECTED_WAIT_TIME (RTIMER_SECOND / 1000)
|
|
|
|
# define CSMA_CONF_SEND_SOFT_ACK 1
|
2018-05-31 15:17:07 +00:00
|
|
|
|
2018-06-29 17:03:17 +00:00
|
|
|
# elif (RF_CORE_MODE == RF_CORE_MODE_2_4_GHZ) && (SUPPORTS_IEEE_MODE)
|
2018-05-31 15:17:07 +00:00
|
|
|
/*----- CC13xx IEEE Mode ----------------------------------------------------*/
|
2018-06-15 14:37:51 +00:00
|
|
|
# define NETSTACK_CONF_RADIO ieee_mode_driver
|
2018-02-06 14:18:07 +00:00
|
|
|
|
2018-06-15 14:37:51 +00:00
|
|
|
# define CSMA_CONF_SEND_SOFT_ACK 0
|
2018-02-06 14:18:07 +00:00
|
|
|
|
2018-06-15 14:37:51 +00:00
|
|
|
# else
|
|
|
|
/*----- CC13xx Non-supported Mode -------------------------------------------*/
|
|
|
|
# error "Invalid radio mode configuration of CC13xx device"
|
2018-06-29 17:03:17 +00:00
|
|
|
# endif /* (RF_CORE_IS_SUB_1_GHZ == 1) && (SUPPORTS_PROP_MODE == 1) */
|
2018-02-06 14:18:07 +00:00
|
|
|
|
2018-06-15 14:37:51 +00:00
|
|
|
/*----- CC26xx Device Line --------------------------------------------------*/
|
|
|
|
/* CC26xx only supports IEEE mode */
|
2018-05-31 15:17:07 +00:00
|
|
|
#elif defined(DEVICE_LINE_CC26XX)
|
|
|
|
|
2018-07-04 17:33:03 +00:00
|
|
|
# if (RF_CORE_MODE == RF_CORE_MODE_2_4_GHZ) && (SUPPORTS_IEEE_MODE)
|
2018-05-31 15:17:07 +00:00
|
|
|
/*----- CC26xx IEEE Mode ----------------------------------------------------*/
|
2018-06-15 14:37:51 +00:00
|
|
|
# define NETSTACK_CONF_RADIO ieee_mode_driver
|
2018-05-31 15:17:07 +00:00
|
|
|
|
2018-06-15 14:37:51 +00:00
|
|
|
# define CSMA_CONF_SEND_SOFT_ACK 0
|
2018-05-31 15:17:07 +00:00
|
|
|
|
2018-06-15 14:37:51 +00:00
|
|
|
# else
|
|
|
|
/*----- CC26xx Non-supported Mode -------------------------------------------*/
|
|
|
|
# error "IEEE mode only supported by CC26xx devices"
|
|
|
|
# endif /* (SUPPORTS_IEEE_MODE == 1) */
|
2018-05-31 15:17:07 +00:00
|
|
|
|
2018-06-15 14:37:51 +00:00
|
|
|
/*----- Unsupported device line ---------------------------------------------*/
|
2018-05-31 15:17:07 +00:00
|
|
|
#else
|
2018-06-15 14:37:51 +00:00
|
|
|
# error "Unsupported Device Line defined"
|
2018-05-31 15:17:07 +00:00
|
|
|
#endif /* defined(DEVICE_LINE_CC13xx) */
|
|
|
|
|
|
|
|
#define NETSTACK_RADIO_MAX_PAYLOAD_LEN 125
|
2018-02-06 14:18:07 +00:00
|
|
|
|
|
|
|
/** @} */
|
|
|
|
/*---------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
|
|
* \name IEEE address configuration
|
2018-02-05 16:18:08 +00:00
|
|
|
*
|
2018-02-06 14:18:07 +00:00
|
|
|
* Used to generate our link-local & IPv6 address
|
|
|
|
* @{
|
2018-02-05 16:18:08 +00:00
|
|
|
*/
|
2018-02-06 14:18:07 +00:00
|
|
|
/**
|
|
|
|
* \brief Location of the IEEE address
|
|
|
|
* 0 => Read from InfoPage,
|
|
|
|
* 1 => Use a hardcoded address, configured by IEEE_ADDR_CONF_ADDRESS
|
|
|
|
*/
|
|
|
|
#ifndef IEEE_ADDR_CONF_HARDCODED
|
2018-05-31 15:17:07 +00:00
|
|
|
#define IEEE_ADDR_CONF_HARDCODED 0
|
2018-02-06 14:18:07 +00:00
|
|
|
#endif
|
2018-02-05 16:18:08 +00:00
|
|
|
|
2018-02-06 14:18:07 +00:00
|
|
|
/**
|
|
|
|
* \brief The hardcoded IEEE address to be used when IEEE_ADDR_CONF_HARDCODED
|
|
|
|
* is defined as 1
|
|
|
|
*/
|
|
|
|
#ifndef IEEE_ADDR_CONF_ADDRESS
|
2018-05-31 15:17:07 +00:00
|
|
|
#define IEEE_ADDR_CONF_ADDRESS { 0x00, 0x12, 0x4B, 0x00, 0x89, 0xAB, 0xCD, 0xEF }
|
2018-02-06 14:18:07 +00:00
|
|
|
#endif
|
|
|
|
/** @} */
|
|
|
|
/*---------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
|
|
* \name RF configuration
|
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
/* RF Config */
|
|
|
|
|
|
|
|
#ifndef IEEE_MODE_CONF_AUTOACK
|
2018-05-31 15:17:07 +00:00
|
|
|
#define IEEE_MODE_CONF_AUTOACK 1 /**< RF H/W generates ACKs */
|
2018-02-06 14:18:07 +00:00
|
|
|
#endif
|
2018-02-05 16:18:08 +00:00
|
|
|
|
2018-02-06 14:18:07 +00:00
|
|
|
#ifndef IEEE_MODE_CONF_PROMISCOUS
|
2018-05-31 15:17:07 +00:00
|
|
|
#define IEEE_MODE_CONF_PROMISCOUS 0 /**< 1 to enable promiscous mode */
|
2018-02-06 14:18:07 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef RF_BLE_CONF_ENABLED
|
2018-05-31 15:17:07 +00:00
|
|
|
#define RF_BLE_CONF_ENABLED 0 /**< 0 to disable BLE support */
|
2018-02-06 14:18:07 +00:00
|
|
|
#endif
|
|
|
|
/** @} */
|
2018-02-05 16:18:08 +00:00
|
|
|
/*---------------------------------------------------------------------------*/
|
|
|
|
/**
|
2018-02-06 14:18:07 +00:00
|
|
|
* \name Character I/O Configuration
|
2018-02-05 16:18:08 +00:00
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*/
|
2018-05-08 19:39:20 +00:00
|
|
|
#ifndef SIMPLELINK_UART_CONF_ENABLE
|
2018-05-31 15:17:07 +00:00
|
|
|
#define SIMPLELINK_UART_CONF_ENABLE 1 /**< Enable/Disable UART I/O */
|
2018-02-06 14:18:07 +00:00
|
|
|
#endif
|
|
|
|
|
2018-05-08 19:39:20 +00:00
|
|
|
#ifndef SIMPLELINK_UART_CONF_BAUD_RATE
|
2018-05-31 15:17:07 +00:00
|
|
|
#define SIMPLELINK_UART_CONF_BAUD_RATE 115200 /**< Default UART0 baud rate */
|
2018-02-06 14:18:07 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Enable I/O over the Debugger Devpack - Only relevant for the SensorTag */
|
|
|
|
#ifndef BOARD_CONF_DEBUGGER_DEVPACK
|
2018-05-31 15:17:07 +00:00
|
|
|
#define BOARD_CONF_DEBUGGER_DEVPACK 1
|
2018-02-06 14:18:07 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef SLIP_ARCH_CONF_ENABLED
|
|
|
|
/*
|
|
|
|
* Determine whether we need SLIP
|
|
|
|
* This will keep working while UIP_FALLBACK_INTERFACE and CMD_CONF_OUTPUT
|
|
|
|
* keep using SLIP
|
|
|
|
*/
|
|
|
|
#if defined(UIP_FALLBACK_INTERFACE) || defined(CMD_CONF_OUTPUT)
|
2018-05-31 15:17:07 +00:00
|
|
|
#define SLIP_ARCH_CONF_ENABLED 1
|
2018-02-06 14:18:07 +00:00
|
|
|
#endif
|
2018-05-31 15:17:07 +00:00
|
|
|
|
|
|
|
#endif /* SLIP_ARCH_CONF_ENABLED */
|
2018-02-06 14:18:07 +00:00
|
|
|
/** @} */
|
|
|
|
/*---------------------------------------------------------------------------*/
|
2018-02-06 15:46:25 +00:00
|
|
|
#endif /* SIMPLELINK_CONF_H_ */
|
2018-02-06 14:18:07 +00:00
|
|
|
/*---------------------------------------------------------------------------*/
|
|
|
|
/** @} */
|