Commit 9cb34c85 authored by Simon Duquennoy's avatar Simon Duquennoy
Browse files

TSCH: more automated configuration

parent f35c15cf
......@@ -124,7 +124,6 @@ typedef uint64_t rtimer_clock_t;
#define UIP_ARCH_IPCHKSUM 1
#if MAC_CONF_WITH_TSCH
#define COOJA_CONF_SIMULATE_TURNAROUND 0
/* A bug in cooja causes many EBs to be missed at scan. Increase EB
frequency to shorten the join process */
#undef TSCH_CONF_EB_PERIOD
......
......@@ -39,7 +39,7 @@
#ifdef COOJA_CONF_SIMULATE_TURNAROUND
#define COOJA_SIMULATE_TURNAROUND COOJA_CONF_SIMULATE_TURNAROUND
#else
#define COOJA_SIMULATE_TURNAROUND 1
#define COOJA_SIMULATE_TURNAROUND (!(MAC_CONF_WITH_TSCH))
#endif
#ifdef COOJA_CONF_TRANSMIT_ON_CCA
......
......@@ -55,7 +55,7 @@
* You need to set this to 1 to use TSCH with its default 2.2ms or larger guard time.
*/
#ifndef CC2650_FAST_RADIO_STARTUP
#define CC2650_FAST_RADIO_STARTUP 0
#define CC2650_FAST_RADIO_STARTUP (MAC_CONF_WITH_TSCH)
#endif
#ifdef RF_CHANNEL
......
......@@ -33,12 +33,6 @@
#define UIP_CONF_ND6_SEND_RA 0
#if CONTIKI_TARGET_COOJA
#define COOJA_CONF_SIMULATE_TURNAROUND 0
#else
#error "This example is intended to be used for Cooja mote."
#endif /* CONTIKI_TARGET_COOJA */
#define TSCH_CONF_WITH_SIXTOP 1
#define TSCH_CONF_AUTOSTART 1
#define TSCH_CONF_DEFAULT_HOPPING_SEQUENCE TSCH_HOPPING_SEQUENCE_1_1
......
......@@ -56,8 +56,7 @@
#if WITH_SECURITY
/* Enable security */
#define LLSEC802154_CONF_ENABLED 1
#define LLSEC802154_CONF_USES_EXPLICIT_KEYS 0
#define LLSEC802154_CONF_USES_FRAME_COUNTER 0
#define TSCH_SECURITY_CONF_K1 { 0x11, 0x11, 0x11, 0x11, \
0x11, 0x11, 0x11, 0x11, \
0x11, 0x11, 0x11, 0x11, \
......@@ -93,35 +92,10 @@
/************* Platform dependent configuration ********/
/*******************************************************/
#if CONTIKI_TARGET_CC2538DK || CONTIKI_TARGET_ZOUL || \
CONTIKI_TARGET_OPENMOTE_CC2538
#define TSCH_CONF_HW_FRAME_FILTERING 0
#endif /* CONTIKI_TARGET_CC2538DK || CONTIKI_TARGET_ZOUL \
|| CONTIKI_TARGET_OPENMOTE_CC2538 */
/* Needed for CC2538 platforms only */
/* For TSCH we have to use the more accurate crystal oscillator
* by default the RC oscillator is activated */
#define SYS_CTRL_CONF_OSC32K_USE_XTAL 1
/* USB serial takes space, free more space elsewhere */
#define SICSLOWPAN_CONF_FRAG 0
#define UIP_CONF_BUFFER_SIZE 160
#if CONTIKI_TARGET_SRF06_CC26XX
#define CC2650_FAST_RADIO_STARTUP 1
#endif /* CONTIK_TARGET_SRF06_CC26XX */
#if CONTIKI_TARGET_COOJA
#define COOJA_CONF_SIMULATE_TURNAROUND 0
#endif /* CONTIKI_TARGET_COOJA */
/* Needed for cc2420 platforms only */
/* Disable DCO calibration (uses timerB) */
#define DCOSYNCH_CONF_ENABLED 0
/* Enable SFD timestamps (uses timerB) */
#define CC2420_CONF_SFD_TIMESTAMPS 1
/*******************************************************/
/******************* Configure 6LoWPAN/IPv6 ************/
/*******************************************************/
......
......@@ -78,10 +78,6 @@
/* Enable security */
#define LLSEC802154_CONF_ENABLED 1
/* TSCH uses explicit keys to identify k1 and k2 */
#define LLSEC802154_CONF_USES_EXPLICIT_KEYS 1
/* TSCH uses the ASN rather than frame counter to construct the Nonce */
#define LLSEC802154_CONF_USES_FRAME_COUNTER 0
#endif /* WITH_SECURITY */
......
......@@ -41,8 +41,4 @@
#define TSCH_CONF_WITH_SIXTOP 1
#if CONTIKI_TARGET_COOJA
#define COOJA_CONF_SIMULATE_TURNAROUND 0
#endif /* CONTIKI_TARGET_COOJA */
#endif /* __PROJECT_CONF_H__ */
......@@ -31,12 +31,6 @@
#ifndef _PROJECT_CONF_H_
#define _PROJECT_CONF_H_
#if CONTIKI_TARGET_COOJA
#define COOJA_CONF_SIMULATE_TURNAROUND 0
#else
//#error "This file is intended to be used for Cooja mote."
#endif /* CONTIKI_TARGET_COOJA */
#define SIXTOP_CONF_MAX_SCHEDULING_FUNCTIONS 2
#define SIXTOP_CONF_MAX_TRANSACTIONS 2
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment