2006-08-21 12:11:16 +00:00
|
|
|
/*
|
2007-11-25 22:47:18 +00:00
|
|
|
* Copyright (c) 2006, Swedish Institute of Computer Science.
|
2006-08-21 12:11:16 +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:
|
|
|
|
* 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. The name of the author may not be used to endorse or promote
|
|
|
|
* products derived from this software without specific prior
|
|
|
|
* written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2013-11-24 15:57:08 +00:00
|
|
|
#ifndef CONTIKI_CONF_H_
|
|
|
|
#define CONTIKI_CONF_H_
|
2007-11-25 22:47:18 +00:00
|
|
|
|
2017-10-07 13:39:48 +00:00
|
|
|
/* include the project config */
|
|
|
|
#ifdef PROJECT_CONF_PATH
|
|
|
|
#include PROJECT_CONF_PATH
|
|
|
|
#endif /* PROJECT_CONF_PATH */
|
|
|
|
|
2015-03-24 13:43:27 +00:00
|
|
|
#ifdef INCLUDE_SUBPLATFORM_CONF
|
|
|
|
#include "subplatform-conf.h"
|
|
|
|
#endif /* INCLUDE_SUBPLATFORM_CONF */
|
|
|
|
|
2018-03-23 19:16:02 +00:00
|
|
|
#define PLATFORM_CONF_PROVIDES_MAIN_LOOP 1
|
|
|
|
|
2010-03-09 08:14:06 +00:00
|
|
|
#define LOG_CONF_ENABLED 1
|
2007-11-25 22:47:18 +00:00
|
|
|
|
|
|
|
#define COOJA 1
|
|
|
|
|
2018-02-25 21:08:12 +00:00
|
|
|
#define LEDS_CONF_LEGACY_API 1
|
|
|
|
|
2013-01-10 17:34:48 +00:00
|
|
|
#ifndef EEPROM_CONF_SIZE
|
|
|
|
#define EEPROM_CONF_SIZE 1024
|
|
|
|
#endif
|
|
|
|
|
2012-12-09 20:24:03 +00:00
|
|
|
#define w_memcpy memcpy
|
|
|
|
|
2010-03-10 07:35:49 +00:00
|
|
|
#ifdef NETSTACK_CONF_H
|
|
|
|
|
2010-03-10 12:18:29 +00:00
|
|
|
/* These header overrides the below default configuration */
|
2010-03-10 07:35:49 +00:00
|
|
|
#define NETSTACK__QUOTEME(s) NETSTACK_QUOTEME(s)
|
|
|
|
#define NETSTACK_QUOTEME(s) #s
|
|
|
|
#include NETSTACK__QUOTEME(NETSTACK_CONF_H)
|
|
|
|
|
|
|
|
#else /* NETSTACK_CONF_H */
|
|
|
|
|
2010-03-10 12:18:29 +00:00
|
|
|
/* Default network config */
|
2017-07-04 09:55:47 +00:00
|
|
|
#define CSMA_CONF_SEND_SOFT_ACK 1
|
2017-05-17 19:47:48 +00:00
|
|
|
#define CSMA_CONF_ACK_WAIT_TIME RTIMER_SECOND / 500
|
|
|
|
#define CSMA_CONF_AFTER_ACK_DETECTED_WAIT_TIME 0
|
2012-12-09 20:24:03 +00:00
|
|
|
|
2017-05-16 16:34:32 +00:00
|
|
|
/* Radio setup */
|
2017-05-16 16:48:30 +00:00
|
|
|
#define NETSTACK_CONF_RADIO cooja_radio_driver
|
2010-03-10 12:18:29 +00:00
|
|
|
|
2010-03-10 07:35:49 +00:00
|
|
|
#endif /* NETSTACK_CONF_H */
|
|
|
|
|
2012-12-09 20:24:03 +00:00
|
|
|
/* Default network config */
|
2014-12-01 20:02:57 +00:00
|
|
|
#if NETSTACK_CONF_WITH_IPV6
|
2012-12-09 20:24:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-16 16:34:32 +00:00
|
|
|
/* Radio setup */
|
2017-05-16 16:48:30 +00:00
|
|
|
#define NETSTACK_CONF_RADIO cooja_radio_driver
|
2012-12-09 20:24:03 +00:00
|
|
|
|
2017-06-10 12:35:39 +00:00
|
|
|
/* configure network size and density */
|
2017-06-30 16:03:58 +00:00
|
|
|
#ifndef NETSTACK_MAX_ROUTE_ENTRIES
|
|
|
|
#define NETSTACK_MAX_ROUTE_ENTRIES 300
|
|
|
|
#endif /* NETSTACK_MAX_ROUTE_ENTRIES */
|
2017-06-27 07:27:00 +00:00
|
|
|
#ifndef NBR_TABLE_CONF_MAX_NEIGHBORS
|
|
|
|
#define NBR_TABLE_CONF_MAX_NEIGHBORS 300
|
|
|
|
#endif /* NBR_TABLE_CONF_MAX_NEIGHBORS */
|
2012-12-09 20:24:03 +00:00
|
|
|
|
2018-04-06 19:19:23 +00:00
|
|
|
/* configure queues */
|
|
|
|
#ifndef QUEUEBUF_CONF_NUM
|
|
|
|
#define QUEUEBUF_CONF_NUM 64
|
|
|
|
#endif /* QUEUEBUF_CONF_NUM */
|
|
|
|
|
2012-12-09 20:24:03 +00:00
|
|
|
#ifndef UIP_CONF_IPV6_QUEUE_PKT
|
|
|
|
#define UIP_CONF_IPV6_QUEUE_PKT 1
|
|
|
|
#endif /* UIP_CONF_IPV6_QUEUE_PKT */
|
|
|
|
|
2014-12-01 20:02:57 +00:00
|
|
|
#endif /* NETSTACK_CONF_WITH_IPV6 */
|
2012-12-09 20:24:03 +00:00
|
|
|
|
2006-08-21 12:11:16 +00:00
|
|
|
#define CC_CONF_REGISTER_ARGS 1
|
|
|
|
#define CC_CONF_FUNCTION_POINTER_ARGS 1
|
|
|
|
#define CC_CONF_VA_ARGS 1
|
2010-03-09 08:14:06 +00:00
|
|
|
#define CC_CONF_INLINE inline
|
2006-08-21 12:11:16 +00:00
|
|
|
|
2012-02-20 19:32:05 +00:00
|
|
|
/* These names are deprecated, use C99 names. */
|
2006-08-21 12:11:16 +00:00
|
|
|
#include <inttypes.h>
|
|
|
|
typedef uint8_t u8_t;
|
|
|
|
typedef uint16_t u16_t;
|
|
|
|
typedef uint32_t u32_t;
|
2007-05-12 20:58:12 +00:00
|
|
|
typedef int32_t s32_t;
|
2012-02-20 19:32:05 +00:00
|
|
|
|
2006-08-21 12:11:16 +00:00
|
|
|
typedef unsigned short uip_stats_t;
|
|
|
|
|
2010-03-09 08:14:06 +00:00
|
|
|
#define CLOCK_CONF_SECOND 1000L
|
2010-03-23 13:34:00 +00:00
|
|
|
typedef unsigned long clock_time_t;
|
2018-04-20 12:06:40 +00:00
|
|
|
|
|
|
|
/* Use 64-bit rtimer (default in Contiki-NG is 32) */
|
|
|
|
#define RTIMER_CONF_CLOCK_SIZE 8
|
2006-08-21 12:11:16 +00:00
|
|
|
|
2016-09-06 13:14:10 +00:00
|
|
|
#define RADIO_DELAY_BEFORE_TX 0
|
|
|
|
#define RADIO_DELAY_BEFORE_RX 0
|
|
|
|
#define RADIO_DELAY_BEFORE_DETECT 0
|
|
|
|
|
2012-12-09 20:24:03 +00:00
|
|
|
#define UIP_ARCH_IPCHKSUM 1
|
|
|
|
|
2017-09-08 16:17:07 +00:00
|
|
|
#if MAC_CONF_WITH_TSCH
|
|
|
|
/* 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
|
|
|
|
#define TSCH_CONF_EB_PERIOD (4 * CLOCK_SECOND)
|
|
|
|
#undef TSCH_CONF_MAX_EB_PERIOD
|
|
|
|
#define TSCH_CONF_MAX_EB_PERIOD (4 * CLOCK_SECOND)
|
|
|
|
#endif /* MAC_CONF_WITH_TSCH */
|
2006-08-21 12:11:16 +00:00
|
|
|
|
2009-09-08 15:08:20 +00:00
|
|
|
#define CFS_CONF_OFFSET_TYPE long
|
|
|
|
|
2015-03-24 13:43:27 +00:00
|
|
|
#define NETSTACK_RADIO_MAX_PAYLOAD_LEN 125
|
|
|
|
|
2017-11-22 17:48:39 +00:00
|
|
|
#define PLATFORM_CONF_SUPPORTS_STACK_CHECK 0
|
|
|
|
|
2013-11-24 15:57:08 +00:00
|
|
|
#endif /* CONTIKI_CONF_H_ */
|