2013-01-12 23:44:42 +01:00
|
|
|
/**
|
2015-02-14 02:13:21 +01:00
|
|
|
* \addtogroup cc2538dk
|
2013-01-12 23:44:42 +01:00
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* \file
|
|
|
|
* Configuration for the cc2538dk platform
|
|
|
|
*/
|
|
|
|
#ifndef CONTIKI_CONF_H_
|
|
|
|
#define CONTIKI_CONF_H_
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <string.h>
|
|
|
|
/*---------------------------------------------------------------------------*/
|
|
|
|
/* Include Project Specific conf */
|
|
|
|
#ifdef PROJECT_CONF_H
|
|
|
|
#include PROJECT_CONF_H
|
|
|
|
#endif /* PROJECT_CONF_H */
|
|
|
|
/*---------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
|
|
* \name Compiler configuration and platform-specific type definitions
|
|
|
|
*
|
|
|
|
* Those values are not meant to be modified by the user
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#define CLOCK_CONF_SECOND 128
|
|
|
|
|
|
|
|
/* Compiler configurations */
|
|
|
|
#define CCIF
|
|
|
|
#define CLIF
|
|
|
|
|
|
|
|
/* Platform typedefs */
|
|
|
|
typedef uint32_t clock_time_t;
|
|
|
|
typedef uint32_t uip_stats_t;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* rtimer.h typedefs rtimer_clock_t as unsigned short. We need to define
|
2016-04-23 00:19:21 +02:00
|
|
|
* RTIMER_CLOCK_DIFF to override this
|
2013-01-12 23:44:42 +01:00
|
|
|
*/
|
|
|
|
typedef uint32_t rtimer_clock_t;
|
2016-04-23 00:19:21 +02:00
|
|
|
#define RTIMER_CLOCK_DIFF(a,b) ((int32_t)((a)-(b)))
|
2013-01-12 23:44:42 +01:00
|
|
|
/** @} */
|
|
|
|
/*---------------------------------------------------------------------------*/
|
2016-03-29 10:24:38 +02:00
|
|
|
/* 352us from calling transmit() until the SFD byte has been sent */
|
|
|
|
#define RADIO_DELAY_BEFORE_TX ((unsigned)US_TO_RTIMERTICKS(352))
|
|
|
|
/* 192us as in datasheet but ACKs are not always received, so adjusted to 250us */
|
|
|
|
#define RADIO_DELAY_BEFORE_RX ((unsigned)US_TO_RTIMERTICKS(250))
|
2016-03-07 18:39:13 +01:00
|
|
|
#define RADIO_DELAY_BEFORE_DETECT 0
|
|
|
|
/*---------------------------------------------------------------------------*/
|
2014-02-02 00:46:45 +01:00
|
|
|
/**
|
|
|
|
* \name Serial Boot Loader Backdoor configuration
|
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#ifndef FLASH_CCA_CONF_BOOTLDR_BACKDOOR
|
|
|
|
#define FLASH_CCA_CONF_BOOTLDR_BACKDOOR 1 /**<Enable the boot loader backdoor */
|
|
|
|
#endif
|
2014-04-15 23:36:55 +02:00
|
|
|
|
2014-04-16 16:19:37 +02:00
|
|
|
#ifndef FLASH_CCA_CONF_BOOTLDR_BACKDOOR_PORT_A_PIN
|
|
|
|
#define FLASH_CCA_CONF_BOOTLDR_BACKDOOR_PORT_A_PIN 3 /**< Pin PA_3 (Select button) activates the boot loader */
|
2014-04-15 23:36:55 +02:00
|
|
|
#endif
|
|
|
|
|
2014-04-18 16:29:47 +02:00
|
|
|
#ifndef FLASH_CCA_CONF_BOOTLDR_BACKDOOR_ACTIVE_HIGH
|
|
|
|
#define FLASH_CCA_CONF_BOOTLDR_BACKDOOR_ACTIVE_HIGH 0 /**< A logic low level activates the boot loader */
|
2014-04-15 23:36:55 +02:00
|
|
|
#endif
|
2014-02-02 00:46:45 +01:00
|
|
|
/** @} */
|
2014-05-02 17:35:58 +02:00
|
|
|
/*---------------------------------------------------------------------------*/
|
2016-08-11 23:49:03 +02:00
|
|
|
/**
|
|
|
|
* \name CC2538 System Control configuration
|
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#ifndef SYS_CTRL_CONF_OSC32K_USE_XTAL
|
|
|
|
#define SYS_CTRL_CONF_OSC32K_USE_XTAL 1 /**< Use the on-board 32.768-kHz crystal */
|
|
|
|
#endif
|
|
|
|
/** @} */
|
|
|
|
/*---------------------------------------------------------------------------*/
|
2014-04-25 22:22:43 +02:00
|
|
|
/**
|
|
|
|
* \name Watchdog Timer configuration
|
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#ifndef WATCHDOG_CONF_ENABLE
|
2014-05-18 13:03:27 +02:00
|
|
|
#define WATCHDOG_CONF_ENABLE 1 /**< Enable the watchdog timer */
|
2014-04-25 22:22:43 +02:00
|
|
|
#endif
|
|
|
|
/** @} */
|
|
|
|
/*---------------------------------------------------------------------------*/
|
2013-01-12 23:44:42 +01:00
|
|
|
/**
|
|
|
|
* \name USB 'core' configuration
|
|
|
|
*
|
|
|
|
* Those values are not meant to be modified by the user, except where stated
|
|
|
|
* otherwise
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#define CTRL_EP_SIZE 8
|
|
|
|
#define USB_EP1_SIZE 32
|
|
|
|
#define USB_EP2_SIZE 64
|
|
|
|
#define USB_EP3_SIZE 64
|
|
|
|
#define USB_ARCH_WRITE_NOTIFY 0
|
|
|
|
|
|
|
|
#ifndef USB_ARCH_CONF_DMA
|
|
|
|
#define USB_ARCH_CONF_DMA 1 /**< Change to Enable/Disable USB DMA */
|
|
|
|
|
|
|
|
#endif
|
|
|
|
/** @} */
|
|
|
|
/*---------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
|
|
* \name Generic Configuration directives
|
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#ifndef ENERGEST_CONF_ON
|
|
|
|
#define ENERGEST_CONF_ON 0 /**< Energest Module */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef STARTUP_CONF_VERBOSE
|
|
|
|
#define STARTUP_CONF_VERBOSE 1 /**< Set to 0 to decrease startup verbosity */
|
|
|
|
#endif
|
|
|
|
/** @} */
|
|
|
|
/*---------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
|
|
* \name uDMA Configuration and channel allocations
|
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#define USB_ARCH_CONF_RX_DMA_CHAN 0 /**< USB -> RAM DMA channel */
|
|
|
|
#define USB_ARCH_CONF_TX_DMA_CHAN 1 /**< RAM -> USB DMA channel */
|
|
|
|
#define CC2538_RF_CONF_TX_DMA_CHAN 2 /**< RF -> RAM DMA channel */
|
|
|
|
#define CC2538_RF_CONF_RX_DMA_CHAN 3 /**< RAM -> RF DMA channel */
|
|
|
|
#define UDMA_CONF_MAX_CHANNEL CC2538_RF_CONF_RX_DMA_CHAN
|
|
|
|
/** @} */
|
|
|
|
/*---------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
|
|
* \name Character I/O Configuration
|
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#ifndef UART_CONF_ENABLE
|
|
|
|
#define UART_CONF_ENABLE 1 /**< Enable/Disable UART I/O */
|
|
|
|
#endif
|
|
|
|
|
2014-04-04 19:33:11 +02:00
|
|
|
#ifndef UART0_CONF_BAUD_RATE
|
|
|
|
#define UART0_CONF_BAUD_RATE 115200 /**< Default UART0 baud rate */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef UART1_CONF_BAUD_RATE
|
|
|
|
#define UART1_CONF_BAUD_RATE 115200 /**< Default UART1 baud rate */
|
2013-01-12 23:44:42 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef SLIP_ARCH_CONF_USB
|
|
|
|
#define SLIP_ARCH_CONF_USB 0 /**< SLIP over UART by default */
|
|
|
|
#endif
|
2014-04-04 19:33:11 +02:00
|
|
|
|
2013-01-12 23:44:42 +01:00
|
|
|
#ifndef DBG_CONF_USB
|
|
|
|
#define DBG_CONF_USB 0 /**< All debugging over UART by default */
|
|
|
|
#endif
|
|
|
|
|
2014-04-04 19:33:11 +02:00
|
|
|
#ifndef SERIAL_LINE_CONF_UART
|
|
|
|
#define SERIAL_LINE_CONF_UART 0 /**< UART to use with serial line */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !SLIP_ARCH_CONF_USB
|
|
|
|
#ifndef SLIP_ARCH_CONF_UART
|
|
|
|
#define SLIP_ARCH_CONF_UART 0 /**< UART to use with SLIP */
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !DBG_CONF_USB
|
|
|
|
#ifndef DBG_CONF_UART
|
|
|
|
#define DBG_CONF_UART 0 /**< UART to use for debugging */
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef UART1_CONF_UART
|
|
|
|
#define UART1_CONF_UART 0 /**< UART to use for examples relying on
|
|
|
|
the uart1_* API */
|
|
|
|
#endif
|
|
|
|
|
2013-01-12 23:44:42 +01:00
|
|
|
/* Turn off example-provided putchars */
|
|
|
|
#define SLIP_BRIDGE_CONF_NO_PUTCHAR 1
|
|
|
|
#define SLIP_RADIO_CONF_NO_PUTCHAR 1
|
|
|
|
|
2013-11-25 20:48:52 +01:00
|
|
|
#ifndef SLIP_ARCH_CONF_ENABLED
|
2013-01-12 23:44:42 +01:00
|
|
|
/*
|
|
|
|
* 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)
|
|
|
|
#define SLIP_ARCH_CONF_ENABLED 1
|
|
|
|
#endif
|
2013-11-25 20:48:52 +01:00
|
|
|
#endif
|
2013-01-12 23:44:42 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Define this as 1 to build a headless node.
|
|
|
|
*
|
|
|
|
* The UART will not be initialised its clock will be gated, offering some
|
|
|
|
* energy savings. The USB will not be initialised either
|
|
|
|
*/
|
|
|
|
#ifndef CC2538_CONF_QUIET
|
|
|
|
#define CC2538_CONF_QUIET 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* CC2538_CONF_QUIET is hard and overrides all other related defines */
|
|
|
|
#if CC2538_CONF_QUIET
|
|
|
|
#undef USB_SERIAL_CONF_ENABLE
|
|
|
|
#define USB_SERIAL_CONF_ENABLE 0
|
|
|
|
|
|
|
|
#undef UART_CONF_ENABLE
|
|
|
|
#define UART_CONF_ENABLE 0
|
|
|
|
|
|
|
|
#undef STARTUP_CONF_VERBOSE
|
|
|
|
#define STARTUP_CONF_VERBOSE 0
|
|
|
|
#endif /* CC2538_CONF_QUIET */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Enable the USB core only if we need it
|
|
|
|
*/
|
|
|
|
#ifndef USB_SERIAL_CONF_ENABLE
|
|
|
|
#define USB_SERIAL_CONF_ENABLE \
|
|
|
|
((SLIP_ARCH_CONF_USB & SLIP_ARCH_CONF_ENABLED) | \
|
2016-07-24 05:28:12 +02:00
|
|
|
DBG_CONF_USB)
|
2013-01-12 23:44:42 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* If debugging and SLIP use the same peripheral, this will be 1. Don't modify
|
|
|
|
* this
|
|
|
|
*/
|
|
|
|
#if SLIP_ARCH_CONF_ENABLED
|
2014-04-04 19:33:11 +02:00
|
|
|
#define DBG_CONF_SLIP_MUX (SLIP_ARCH_CONF_USB == DBG_CONF_USB && \
|
|
|
|
(SLIP_ARCH_CONF_USB || \
|
|
|
|
SLIP_ARCH_CONF_UART == DBG_CONF_UART))
|
2013-01-12 23:44:42 +01:00
|
|
|
#endif
|
2014-04-04 19:33:11 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Automatic detection of whether a specific UART is in use
|
|
|
|
*/
|
|
|
|
#define UART_IN_USE_BY_SERIAL_LINE(u) (SERIAL_LINE_CONF_UART == (u))
|
|
|
|
#define UART_IN_USE_BY_SLIP(u) (SLIP_ARCH_CONF_ENABLED && \
|
|
|
|
!SLIP_ARCH_CONF_USB && \
|
|
|
|
SLIP_ARCH_CONF_UART == (u))
|
|
|
|
#define UART_IN_USE_BY_DBG(u) (!DBG_CONF_USB && DBG_CONF_UART == (u))
|
|
|
|
#define UART_IN_USE_BY_UART1(u) (UART1_CONF_UART == (u))
|
|
|
|
|
|
|
|
#define UART_IN_USE(u) ( \
|
|
|
|
UART_CONF_ENABLE && \
|
|
|
|
(UART_IN_USE_BY_SERIAL_LINE(u) || \
|
|
|
|
UART_IN_USE_BY_SLIP(u) || \
|
|
|
|
UART_IN_USE_BY_DBG(u) || \
|
|
|
|
UART_IN_USE_BY_UART1(u)) \
|
|
|
|
)
|
2013-01-12 23:44:42 +01:00
|
|
|
/** @} */
|
|
|
|
/*---------------------------------------------------------------------------*/
|
|
|
|
/* board.h assumes that basic configuration is done */
|
|
|
|
#include "board.h"
|
|
|
|
/*---------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
|
|
* \name Network Stack Configuration
|
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#ifndef NETSTACK_CONF_NETWORK
|
2014-12-01 21:02:57 +01:00
|
|
|
#if NETSTACK_CONF_WITH_IPV6
|
2013-01-12 23:44:42 +01:00
|
|
|
#define NETSTACK_CONF_NETWORK sicslowpan_driver
|
|
|
|
#else
|
|
|
|
#define NETSTACK_CONF_NETWORK rime_driver
|
2014-12-01 21:02:57 +01:00
|
|
|
#endif /* NETSTACK_CONF_WITH_IPV6 */
|
2013-01-12 23:44:42 +01:00
|
|
|
#endif /* NETSTACK_CONF_NETWORK */
|
|
|
|
|
|
|
|
#ifndef NETSTACK_CONF_MAC
|
|
|
|
#define NETSTACK_CONF_MAC csma_driver
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef NETSTACK_CONF_RDC
|
|
|
|
#define NETSTACK_CONF_RDC contikimac_driver
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Configure NullRDC for when it's selected */
|
|
|
|
#define NULLRDC_802154_AUTOACK 1
|
|
|
|
#define NULLRDC_802154_AUTOACK_HW 1
|
|
|
|
|
|
|
|
/* Configure ContikiMAC for when it's selected */
|
2013-08-06 16:39:16 +02:00
|
|
|
#define CONTIKIMAC_CONF_WITH_PHASE_OPTIMIZATION 0
|
2013-01-12 23:44:42 +01:00
|
|
|
#define WITH_FAST_SLEEP 1
|
|
|
|
|
|
|
|
#ifndef NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE
|
|
|
|
#define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE 8
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef NETSTACK_CONF_FRAMER
|
2014-12-01 21:02:57 +01:00
|
|
|
#if NETSTACK_CONF_WITH_IPV6
|
2013-01-12 23:44:42 +01:00
|
|
|
#define NETSTACK_CONF_FRAMER framer_802154
|
2014-12-01 21:02:57 +01:00
|
|
|
#else /* NETSTACK_CONF_WITH_IPV6 */
|
2014-11-18 09:42:39 +01:00
|
|
|
#define NETSTACK_CONF_FRAMER contikimac_framer
|
2014-12-01 21:02:57 +01:00
|
|
|
#endif /* NETSTACK_CONF_WITH_IPV6 */
|
2014-11-18 09:42:39 +01:00
|
|
|
#endif /* NETSTACK_CONF_FRAMER */
|
2013-01-12 23:44:42 +01:00
|
|
|
|
|
|
|
#define NETSTACK_CONF_RADIO cc2538_rf_driver
|
|
|
|
/** @} */
|
|
|
|
/*---------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
|
|
* \name LPM configuration
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#ifndef LPM_CONF_ENABLE
|
|
|
|
#define LPM_CONF_ENABLE 1 /**< Set to 0 to disable LPM entirely */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Maximum PM
|
|
|
|
*
|
|
|
|
* The SoC will never drop to a Power Mode deeper than the one specified here.
|
|
|
|
* 0 for PM0, 1 for PM1 and 2 for PM2
|
|
|
|
*/
|
|
|
|
#ifndef LPM_CONF_MAX_PM
|
|
|
|
#define LPM_CONF_MAX_PM 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef LPM_CONF_STATS
|
|
|
|
#define LPM_CONF_STATS 0 /**< Set to 1 to enable LPM-related stats */
|
|
|
|
#endif
|
|
|
|
/** @} */
|
|
|
|
/*---------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
|
|
* \name IEEE address configuration
|
|
|
|
*
|
|
|
|
* Used to generate our RIME & IPv6 address
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* \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
|
2013-08-06 21:01:36 +02:00
|
|
|
#define IEEE_ADDR_CONF_HARDCODED 0
|
2013-01-12 23:44:42 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief The hardcoded IEEE address to be used when IEEE_ADDR_CONF_HARDCODED
|
|
|
|
* is defined as 1
|
|
|
|
*/
|
|
|
|
#ifndef IEEE_ADDR_CONF_ADDRESS
|
|
|
|
#define IEEE_ADDR_CONF_ADDRESS { 0x00, 0x12, 0x4B, 0x00, 0x89, 0xAB, 0xCD, 0xEF }
|
|
|
|
#endif
|
2014-03-06 00:19:15 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Location of the IEEE address in the InfoPage when
|
|
|
|
* IEEE_ADDR_CONF_HARDCODED is defined as 0
|
|
|
|
* 0 => Use the primary address location
|
|
|
|
* 1 => Use the secondary address location
|
|
|
|
*/
|
|
|
|
#ifndef IEEE_ADDR_CONF_USE_SECONDARY_LOCATION
|
|
|
|
#define IEEE_ADDR_CONF_USE_SECONDARY_LOCATION 0
|
|
|
|
#endif
|
2013-01-12 23:44:42 +01:00
|
|
|
/** @} */
|
|
|
|
/*---------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
|
|
* \name RF configuration
|
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
/* RF Config */
|
2013-09-10 02:56:07 +02:00
|
|
|
#ifndef IEEE802154_CONF_PANID
|
2014-12-08 23:32:55 +01:00
|
|
|
#define IEEE802154_CONF_PANID 0xABCD
|
2013-09-10 02:56:07 +02:00
|
|
|
#endif
|
2013-01-12 23:44:42 +01:00
|
|
|
|
2016-11-25 10:31:46 +01:00
|
|
|
#ifdef RF_CHANNEL
|
|
|
|
#define CC2538_RF_CONF_CHANNEL RF_CHANNEL
|
|
|
|
#endif
|
|
|
|
|
2013-01-12 23:44:42 +01:00
|
|
|
#ifndef CC2538_RF_CONF_CHANNEL
|
|
|
|
#define CC2538_RF_CONF_CHANNEL 25
|
|
|
|
#endif /* CC2538_RF_CONF_CHANNEL */
|
|
|
|
|
|
|
|
#ifndef CC2538_RF_CONF_AUTOACK
|
|
|
|
#define CC2538_RF_CONF_AUTOACK 1 /**< RF H/W generates ACKs */
|
|
|
|
#endif /* CC2538_CONF_AUTOACK */
|
|
|
|
|
|
|
|
#ifndef CC2538_RF_CONF_TX_USE_DMA
|
|
|
|
#define CC2538_RF_CONF_TX_USE_DMA 1 /**< RF TX over DMA */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CC2538_RF_CONF_RX_USE_DMA
|
|
|
|
#define CC2538_RF_CONF_RX_USE_DMA 1 /**< RF RX over DMA */
|
|
|
|
#endif
|
|
|
|
/** @} */
|
|
|
|
/*---------------------------------------------------------------------------*/
|
|
|
|
/**
|
|
|
|
* \name IPv6, RIME and network buffer configuration
|
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Don't let contiki-default-conf.h decide if we are an IPv6 build */
|
2014-12-01 21:02:57 +01:00
|
|
|
#ifndef NETSTACK_CONF_WITH_IPV6
|
|
|
|
#define NETSTACK_CONF_WITH_IPV6 0
|
2013-01-12 23:44:42 +01:00
|
|
|
#endif
|
|
|
|
|
2014-12-01 21:02:57 +01:00
|
|
|
#if NETSTACK_CONF_WITH_IPV6
|
2013-01-12 23:44:42 +01:00
|
|
|
/* Addresses, Sizes and Interfaces */
|
|
|
|
/* 8-byte addresses here, 2 otherwise */
|
2013-12-12 23:58:52 +01:00
|
|
|
#define LINKADDR_CONF_SIZE 8
|
2013-01-12 23:44:42 +01:00
|
|
|
#define UIP_CONF_LL_802154 1
|
|
|
|
#define UIP_CONF_LLH_LEN 0
|
|
|
|
#define UIP_CONF_NETIF_MAX_ADDRESSES 3
|
|
|
|
|
|
|
|
/* TCP, UDP, ICMP */
|
|
|
|
#ifndef UIP_CONF_TCP
|
|
|
|
#define UIP_CONF_TCP 1
|
|
|
|
#endif
|
2013-10-31 17:52:58 +01:00
|
|
|
#ifndef UIP_CONF_TCP_MSS
|
2013-01-12 23:44:42 +01:00
|
|
|
#define UIP_CONF_TCP_MSS 64
|
2013-10-31 17:52:58 +01:00
|
|
|
#endif
|
2013-01-12 23:44:42 +01:00
|
|
|
#define UIP_CONF_UDP 1
|
|
|
|
#define UIP_CONF_UDP_CHECKSUMS 1
|
|
|
|
#define UIP_CONF_ICMP6 1
|
|
|
|
|
|
|
|
/* ND and Routing */
|
|
|
|
#ifndef UIP_CONF_ROUTER
|
|
|
|
#define UIP_CONF_ROUTER 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define UIP_CONF_ND6_SEND_RA 0
|
|
|
|
#define UIP_CONF_IP_FORWARD 0
|
|
|
|
#define RPL_CONF_STATS 0
|
2015-08-29 20:22:18 +02:00
|
|
|
|
2013-01-12 23:44:42 +01:00
|
|
|
#define UIP_CONF_ND6_REACHABLE_TIME 600000
|
|
|
|
#define UIP_CONF_ND6_RETRANS_TIMER 10000
|
|
|
|
|
2013-07-29 18:49:21 +02:00
|
|
|
#ifndef NBR_TABLE_CONF_MAX_NEIGHBORS
|
|
|
|
#define NBR_TABLE_CONF_MAX_NEIGHBORS 20
|
2013-01-12 23:44:42 +01:00
|
|
|
#endif
|
|
|
|
#ifndef UIP_CONF_MAX_ROUTES
|
|
|
|
#define UIP_CONF_MAX_ROUTES 20
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* uIP */
|
|
|
|
#ifndef UIP_CONF_BUFFER_SIZE
|
|
|
|
#define UIP_CONF_BUFFER_SIZE 1300
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define UIP_CONF_IPV6_QUEUE_PKT 0
|
|
|
|
#define UIP_CONF_IPV6_CHECKS 1
|
|
|
|
#define UIP_CONF_IPV6_REASSEMBLY 0
|
|
|
|
#define UIP_CONF_MAX_LISTENPORTS 8
|
|
|
|
|
|
|
|
/* 6lowpan */
|
|
|
|
#define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_COMPRESSION_HC06
|
2013-09-10 02:56:07 +02:00
|
|
|
#ifndef SICSLOWPAN_CONF_COMPRESSION_THRESHOLD
|
2013-01-12 23:44:42 +01:00
|
|
|
#define SICSLOWPAN_CONF_COMPRESSION_THRESHOLD 63
|
2013-09-10 02:56:07 +02:00
|
|
|
#endif
|
2013-01-12 23:44:42 +01:00
|
|
|
#ifndef SICSLOWPAN_CONF_FRAG
|
|
|
|
#define SICSLOWPAN_CONF_FRAG 1
|
|
|
|
#endif
|
|
|
|
#define SICSLOWPAN_CONF_MAXAGE 8
|
|
|
|
|
|
|
|
/* Define our IPv6 prefixes/contexts here */
|
|
|
|
#define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 1
|
2013-09-10 02:56:07 +02:00
|
|
|
#ifndef SICSLOWPAN_CONF_ADDR_CONTEXT_0
|
2013-01-12 23:44:42 +01:00
|
|
|
#define SICSLOWPAN_CONF_ADDR_CONTEXT_0 { \
|
2015-09-30 16:06:58 +02:00
|
|
|
addr_contexts[0].prefix[0] = UIP_DS6_DEFAULT_PREFIX_0; \
|
|
|
|
addr_contexts[0].prefix[1] = UIP_DS6_DEFAULT_PREFIX_1; \
|
2013-01-12 23:44:42 +01:00
|
|
|
}
|
2013-09-10 02:56:07 +02:00
|
|
|
#endif
|
2013-01-12 23:44:42 +01:00
|
|
|
|
|
|
|
#define MAC_CONF_CHANNEL_CHECK_RATE 8
|
|
|
|
|
|
|
|
#ifndef QUEUEBUF_CONF_NUM
|
|
|
|
#define QUEUEBUF_CONF_NUM 8
|
|
|
|
#endif
|
|
|
|
/*---------------------------------------------------------------------------*/
|
2014-12-01 21:02:57 +01:00
|
|
|
#else /* NETSTACK_CONF_WITH_IPV6 */
|
2013-01-12 23:44:42 +01:00
|
|
|
/* Network setup for non-IPv6 (rime). */
|
|
|
|
#define UIP_CONF_IP_FORWARD 1
|
|
|
|
|
|
|
|
#ifndef UIP_CONF_BUFFER_SIZE
|
|
|
|
#define UIP_CONF_BUFFER_SIZE 108
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define RIME_CONF_NO_POLITE_ANNOUCEMENTS 0
|
|
|
|
|
|
|
|
#ifndef QUEUEBUF_CONF_NUM
|
|
|
|
#define QUEUEBUF_CONF_NUM 8
|
|
|
|
#endif
|
|
|
|
|
2014-12-01 21:02:57 +01:00
|
|
|
#endif /* NETSTACK_CONF_WITH_IPV6 */
|
2013-01-12 23:44:42 +01:00
|
|
|
/** @} */
|
|
|
|
/*---------------------------------------------------------------------------*/
|
2015-10-21 10:18:04 +02:00
|
|
|
/**
|
|
|
|
* \name Security
|
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#ifndef CRYPTO_CONF_INIT
|
|
|
|
#define CRYPTO_CONF_INIT 1 /**< Whether to init cryptoprocessor */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef AES_128_CONF
|
|
|
|
#define AES_128_CONF cc2538_aes_128_driver /**< AES-128 driver */
|
|
|
|
#endif
|
2015-12-26 00:42:39 +01:00
|
|
|
|
|
|
|
#ifndef CCM_STAR_CONF
|
|
|
|
#define CCM_STAR_CONF cc2538_ccm_star_driver /**< AES-CCM* driver */
|
|
|
|
#endif
|
2015-10-21 10:18:04 +02:00
|
|
|
/** @} */
|
|
|
|
/*---------------------------------------------------------------------------*/
|
2013-01-12 23:44:42 +01:00
|
|
|
|
|
|
|
#endif /* CONTIKI_CONF_H_ */
|
|
|
|
|
|
|
|
/** @} */
|