nes-proj/arch/platform/cooja/contiki-conf.h

151 lines
4.3 KiB
C
Raw Normal View History

/*
* Copyright (c) 2006, Swedish Institute of Computer Science.
* 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.
*
*
*/
#ifndef CONTIKI_CONF_H_
#define CONTIKI_CONF_H_
/* include the project config */
#ifdef PROJECT_CONF_PATH
#include PROJECT_CONF_PATH
#endif /* PROJECT_CONF_PATH */
#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
#define LOG_CONF_ENABLED 1
#define COOJA 1
#define LEDS_CONF_LEGACY_API 1
#ifndef EEPROM_CONF_SIZE
#define EEPROM_CONF_SIZE 1024
#endif
#define w_memcpy memcpy
2010-03-10 07:35:49 +00:00
#ifdef NETSTACK_CONF_H
/* 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 */
/* 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
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 07:35:49 +00:00
#endif /* NETSTACK_CONF_H */
/* Default network config */
#if NETSTACK_CONF_WITH_IPV6
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
/* configure network size and density */
#ifndef NETSTACK_MAX_ROUTE_ENTRIES
#define NETSTACK_MAX_ROUTE_ENTRIES 300
#endif /* NETSTACK_MAX_ROUTE_ENTRIES */
#ifndef NBR_TABLE_CONF_MAX_NEIGHBORS
#define NBR_TABLE_CONF_MAX_NEIGHBORS 300
#endif /* NBR_TABLE_CONF_MAX_NEIGHBORS */
/* configure queues */
#ifndef QUEUEBUF_CONF_NUM
#define QUEUEBUF_CONF_NUM 64
#endif /* QUEUEBUF_CONF_NUM */
#ifndef UIP_CONF_IPV6_QUEUE_PKT
#define UIP_CONF_IPV6_QUEUE_PKT 1
#endif /* UIP_CONF_IPV6_QUEUE_PKT */
#endif /* NETSTACK_CONF_WITH_IPV6 */
#define CC_CONF_REGISTER_ARGS 1
#define CC_CONF_FUNCTION_POINTER_ARGS 1
#define CC_CONF_VA_ARGS 1
#define CC_CONF_INLINE inline
/* These names are deprecated, use C99 names. */
#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;
typedef unsigned short uip_stats_t;
#define CLOCK_CONF_SECOND 1000L
typedef unsigned long clock_time_t;
/* Use 64-bit rtimer (default in Contiki-NG is 32) */
#define RTIMER_CONF_CLOCK_SIZE 8
/* 1 len byte, 2 bytes CRC */
#define RADIO_PHY_OVERHEAD 3
/* 250kbps data rate. One byte = 32us */
#define RADIO_BYTE_AIR_TIME 32
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
#define UIP_ARCH_IPCHKSUM 1
#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 */
#define CFS_CONF_OFFSET_TYPE long
#define NETSTACK_RADIO_MAX_PAYLOAD_LEN 125
2017-11-22 17:48:39 +00:00
#define PLATFORM_CONF_SUPPORTS_STACK_CHECK 0
#endif /* CONTIKI_CONF_H_ */