Contiki 2.6
|
00001 /* 00002 * Copyright (c) 2010, Mariano Alvira <mar@devl.org> and other contributors 00003 * to the MC1322x project (http://mc1322x.devl.org) and Contiki. 00004 * 00005 * Copyright (c) 2006, Technical University of Munich 00006 * All rights reserved. 00007 * 00008 * Redistribution and use in source and binary forms, with or without 00009 * modification, are permitted provided that the following conditions 00010 * are met: 00011 * 1. Redistributions of source code must retain the above copyright 00012 * notice, this list of conditions and the following disclaimer. 00013 * 2. Redistributions in binary form must reproduce the above copyright 00014 * notice, this list of conditions and the following disclaimer in the 00015 * documentation and/or other materials provided with the distribution. 00016 * 3. Neither the name of the Institute nor the names of its contributors 00017 * may be used to endorse or promote products derived from this software 00018 * without specific prior written permission. 00019 * 00020 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 00021 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00022 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00023 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 00024 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00025 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 00026 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00027 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00028 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 00029 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00030 * SUCH DAMAGE. 00031 * 00032 * This file is part of the Contiki operating system. 00033 * 00034 * @(#)$$ 00035 */ 00036 00037 /** 00038 * \file 00039 * Configuration for MC1322x hobby board based on 00040 * Configuration for sample STK 501 Contiki kernel 00041 * 00042 * \author 00043 * Originial by: 00044 * Simon Barner <barner@in.tum.de 00045 * This version by: 00046 * Mariano Alvira <mar@devl.org> 00047 */ 00048 00049 #ifndef __CONTIKI_CONF_H__ 00050 #define __CONTIKI_CONF_H__ 00051 00052 #include <stdint.h> 00053 00054 #define PLATFORM_NAME "Econotag" 00055 #define PLATFORM_TYPE MC1322X 00056 /* mc1322x files */ 00057 #include "contiki-mc1322x-conf.h" 00058 /* this is from cpu/mc1322x/board */ 00059 #include "redbee-econotag.h" 00060 00061 /* Clock ticks per second */ 00062 #define CLOCK_CONF_SECOND 100 00063 /* set to 1 to toggle the green led ever second */ 00064 /* FIXME setting this will break the sensor button (and other gpio) */ 00065 /* since leds_arch hits the entire gpio_data */ 00066 #define BLINK_SECONDS 0 00067 /* Set to 1 to sample an ADC channel every second, 9 second refresh */ 00068 /* Set >1 to sample an ADC channel every tick, 90 msec refresh */ 00069 #define CLOCK_CONF_SAMPLEADC 1 00070 00071 #define CCIF 00072 #define CLIF 00073 00074 /* Baud rate */ 00075 #define BRMOD 9999 00076 /* 230400 bps, INC=767, MOD=9999, 24Mhz 16x samp */ 00077 /* 115200 bps, INC=767, MOD=9999, 24Mhz 8x samp */ 00078 #define BRINC 767 00079 /* 921600 bps, MOD=9999, 24Mhz 16x samp */ 00080 //#define BRINC 3071 00081 #define SAMP UCON_SAMP_8X 00082 //#define SAMP UCON_SAMP_16X 00083 00084 #define uart_init uart1_init 00085 #define dbg_putchar(x) uart1_putc(x) 00086 00087 #define USE_FORMATTED_STDIO 1 00088 #define MACA_DEBUG 0 00089 #define CONTIKI_MACA_RAW_MODE 0 00090 #define USE_32KHZ_XTAL 0 00091 00092 #define BLOCKING_TX 1 00093 #define MACA_AUTOACK 1 00094 #define NULLRDC_CONF_802154_AUTOACK_HW 1 00095 00096 #define USE_WDT 0 00097 00098 #ifndef WDT_TIMEOUT 00099 #define WDT_TIMEOUT 5000 /* watchdog timeout in ms */ 00100 #endif 00101 00102 /* end of mc1322x specific config. */ 00103 00104 /* start of conitki config. */ 00105 #define PLATFORM_HAS_LEDS 1 00106 #define PLATFORM_HAS_BUTTON 1 00107 00108 /* Core rtimer.h defaults to 16 bit timer unless RTIMER_CLOCK_LT is defined */ 00109 typedef unsigned long rtimer_clock_t; 00110 #define RTIMER_CLOCK_LT(a,b) ((signed long)((a)-(b)) < 0) 00111 00112 #define RIMEADDR_CONF_SIZE 8 00113 00114 /* EUI64 generation */ 00115 /* Organizationally Unique Identifier */ 00116 #define OUI 0xacde48 /* if IAB is defined then OUI = 0x0050C2 */ 00117 #define IAB 0xA8C /* IAB 0xA8C for use on Redwire products only */ 00118 //#undef IAB /* do not define an IAB if you are using a full OUI */ 00119 //#define EXT_ID 0xdef123 /* lower 12-bits used if IAB is defined */ 00120 #undef EXT_ID /* if an extention id is not defined then one will be generated randomly */ 00121 00122 #define FLASH_BLANK_ADDR /* if defined then the generated rime address will flashed */ 00123 00124 #if WITH_UIP6 00125 /* Network setup for IPv6 */ 00126 #define NETSTACK_CONF_NETWORK sicslowpan_driver 00127 #define NETSTACK_CONF_MAC nullmac_driver 00128 /*#define NETSTACK_CONF_RDC contikimac_driver*/ /* contikimac for redbee hasn't been well tested */ 00129 #define NETSTACK_CONF_RDC nullrdc_driver 00130 #define NETSTACK_CONF_RADIO contiki_maca_driver 00131 #define NETSTACK_CONF_FRAMER framer_802154 00132 00133 #define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE 8 00134 #define RIME_CONF_NO_POLITE_ANNOUCEMENTS 0 00135 #define CXMAC_CONF_ANNOUNCEMENTS 0 00136 #define XMAC_CONF_ANNOUNCEMENTS 0 00137 00138 #else /* WITH_UIP6 */ 00139 /* Network setup for non-IPv6 (rime). */ 00140 00141 #define NETSTACK_CONF_NETWORK rime_driver 00142 #define NETSTACK_CONF_MAC csma_driver 00143 #define NETSTACK_CONF_RDC sicslowmac_driver 00144 #define NETSTACK_CONF_RADIO contiki_maca_driver 00145 #define NETSTACK_CONF_FRAMER framer_802154 00146 00147 #define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE 8 00148 00149 #define COLLECT_CONF_ANNOUNCEMENTS 1 00150 #define RIME_CONF_NO_POLITE_ANNOUCEMENTS 0 00151 #define CXMAC_CONF_ANNOUNCEMENTS 0 00152 #define XMAC_CONF_ANNOUNCEMENTS 0 00153 #define CONTIKIMAC_CONF_ANNOUNCEMENTS 0 00154 00155 #define CONTIKIMAC_CONF_COMPOWER 0 00156 #define XMAC_CONF_COMPOWER 0 00157 #define CXMAC_CONF_COMPOWER 0 00158 00159 #define COLLECT_NEIGHBOR_CONF_MAX_NEIGHBORS 32 00160 00161 #endif /* WITH_UIP6 */ 00162 00163 #define QUEUEBUF_CONF_NUM 16 00164 00165 #define PACKETBUF_CONF_ATTRS_INLINE 1 00166 00167 #ifndef RF_CHANNEL 00168 #define RF_CHANNEL 26 00169 #endif /* RF_CHANNEL */ 00170 00171 #define CONTIKIMAC_CONF_BROADCAST_RATE_LIMIT 0 00172 00173 #define IEEE802154_CONF_PANID 0xABCD 00174 00175 #define PROFILE_CONF_ON 0 00176 #define ENERGEST_CONF_ON 0 00177 00178 #define AODV_COMPLIANCE 00179 #define AODV_NUM_RT_ENTRIES 32 00180 00181 #define WITH_ASCII 1 00182 00183 #define PROCESS_CONF_NUMEVENTS 8 00184 #define PROCESS_CONF_STATS 1 00185 00186 #ifdef WITH_UIP6 00187 00188 #define RIMEADDR_CONF_SIZE 8 00189 00190 #define UIP_CONF_LL_802154 1 00191 #define UIP_CONF_LLH_LEN 0 00192 00193 #define UIP_CONF_ROUTER 1 00194 #define UIP_CONF_IPV6_RPL 1 00195 00196 #define UIP_CONF_DS6_NBR_NBU 30 00197 #define UIP_CONF_DS6_ROUTE_NBU 30 00198 00199 #define UIP_CONF_ND6_SEND_RA 0 00200 #define UIP_CONF_ND6_REACHABLE_TIME 600000 00201 #define UIP_CONF_ND6_RETRANS_TIMER 10000 00202 00203 #define UIP_CONF_IPV6 1 00204 #define UIP_CONF_IPV6_QUEUE_PKT 0 00205 #define UIP_CONF_IPV6_CHECKS 1 00206 #define UIP_CONF_IPV6_REASSEMBLY 0 00207 #define UIP_CONF_NETIF_MAX_ADDRESSES 3 00208 #define UIP_CONF_ND6_MAX_PREFIXES 3 00209 #define UIP_CONF_ND6_MAX_NEIGHBORS 4 00210 #define UIP_CONF_ND6_MAX_DEFROUTERS 2 00211 #define UIP_CONF_IP_FORWARD 0 00212 #define UIP_CONF_BUFFER_SIZE 1300 00213 #define SICSLOWPAN_CONF_FRAG 1 00214 #define SICSLOWPAN_CONF_MAXAGE 8 00215 00216 #define SICSLOWPAN_CONF_COMPRESSION_IPV6 0 00217 #define SICSLOWPAN_CONF_COMPRESSION_HC1 1 00218 #define SICSLOWPAN_CONF_COMPRESSION_HC01 2 00219 #define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_COMPRESSION_HC06 00220 #ifndef SICSLOWPAN_CONF_FRAG 00221 #define SICSLOWPAN_CONF_FRAG 1 00222 #define SICSLOWPAN_CONF_MAXAGE 8 00223 #endif /* SICSLOWPAN_CONF_FRAG */ 00224 #define SICSLOWPAN_CONF_CONVENTIONAL_MAC 1 00225 #define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 2 00226 #else /* WITH_UIP6 */ 00227 #define UIP_CONF_IP_FORWARD 1 00228 #define UIP_CONF_BUFFER_SIZE 1300 00229 #endif /* WITH_UIP6 */ 00230 00231 #define UIP_CONF_ICMP_DEST_UNREACH 1 00232 00233 #define UIP_CONF_DHCP_LIGHT 00234 #define UIP_CONF_LLH_LEN 0 00235 #define UIP_CONF_RECEIVE_WINDOW 300 00236 #define UIP_CONF_TCP_MSS 48 00237 #define UIP_CONF_MAX_CONNECTIONS 4 00238 #define UIP_CONF_MAX_LISTENPORTS 8 00239 #define UIP_CONF_UDP_CONNS 12 00240 #define UIP_CONF_FWCACHE_SIZE 30 00241 #define UIP_CONF_BROADCAST 1 00242 #define UIP_ARCH_IPCHKSUM 1 00243 #define UIP_CONF_UDP 1 00244 #define UIP_CONF_UDP_CHECKSUMS 1 00245 #define UIP_CONF_PINGADDRCONF 0 00246 #define UIP_CONF_LOGGING 0 00247 00248 #define UIP_CONF_TCP_SPLIT 0 00249 00250 /* include the project config */ 00251 /* PROJECT_CONF_H might be defined in the project Makefile */ 00252 #ifdef PROJECT_CONF_H 00253 #include PROJECT_CONF_H 00254 #endif /* PROJECT_CONF_H */ 00255 00256 #endif /* __CONTIKI_CONF_H__ */