contiki-conf.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2006, Technical University of Munich
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  * 1. Redistributions of source code must retain the above copyright
00009  *    notice, this list of conditions and the following disclaimer.
00010  * 2. Redistributions in binary form must reproduce the above copyright
00011  *    notice, this list of conditions and the following disclaimer in the
00012  *    documentation and/or other materials provided with the distribution.
00013  * 3. Neither the name of the Institute nor the names of its contributors
00014  *    may be used to endorse or promote products derived from this software
00015  *    without specific prior written permission.
00016  *
00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00027  * SUCH DAMAGE.
00028  *
00029  * This file is part of the Contiki operating system.
00030  *
00031  * @(#)$$
00032  */
00033 
00034 /**
00035  * \file
00036  *         Configuration for AVR Zigbit Contiki kernel
00037  *
00038  * \author
00039  *         Simon Barner <barner@in.tum.de>
00040  */
00041 
00042 #ifndef __CONTIKI_CONF_H__
00043 #define __CONTIKI_CONF_H__
00044 
00045 /* MCU and clock rate */
00046 #define PLATFORM PLATFORM_AVR
00047 #define HARWARE_REVISION ZIGBIT
00048 
00049 /* Clock ticks per second */
00050 #define CLOCK_CONF_SECOND 125
00051 
00052 /* Since clock_time_t is 16 bits, maximum interval is 524 seconds */
00053 #define RIME_CONF_BROADCAST_ANNOUNCEMENT_MAX_TIME CLOCK_CONF_SECOND * 524UL /*Default uses 600*/
00054 
00055 /* Maximum time interval (used for timers) */
00056 #define INFINITE_TIME 0xffff
00057 
00058 /* COM port to be used for SLIP connection */
00059 #define SLIP_PORT RS232_PORT_0
00060 
00061 /* Pre-allocated memory for loadable modules heap space (in bytes)*/
00062 #define MMEM_CONF_SIZE 256
00063 
00064 /* Use the following address for code received via the codeprop
00065  * facility
00066  */
00067 #define EEPROMFS_ADDR_CODEPROP 0x8000
00068 
00069 #define CCIF
00070 #define CLIF
00071 
00072 #define RIMEADDR_CONF_SIZE       8
00073 #define PACKETBUF_CONF_HDR_SIZE    0
00074 
00075 //define UIP_CONF_IPV6            1 //Let the makefile do this, allows hello-world to compile
00076 #if UIP_CONF_IPV6
00077 #define UIP_CONF_ICMP6           1
00078 #define UIP_CONF_UDP             1
00079 #define UIP_CONF_TCP             1
00080 #endif
00081 
00082 /* The new NETSTACK interface requires RF230BB */
00083 #if RF230BB
00084 #define SICSLOWPAN_CONF_COMPRESSION       SICSLOWPAN_COMPRESSION_HC06
00085 #define SICSLOWPAN_CONF_CONVENTIONAL_MAC  1     //for barebones driver, sicslowpan calls radio->read function
00086 #undef PACKETBUF_CONF_HDR_SIZE                  //RF230BB takes the packetbuf default for header size
00087 #define UIP_CONF_LLH_LEN         0
00088 
00089 /* No radio cycling */
00090 #if UIP_CONF_IPV6
00091 #define NETSTACK_CONF_NETWORK     sicslowpan_driver
00092 #else
00093 #define NETSTACK_CONF_NETWORK     rime_driver
00094 #endif
00095 #define NETSTACK_CONF_MAC         nullmac_driver
00096 #define NETSTACK_CONF_RDC         sicslowmac_driver
00097 #define NETSTACK_CONF_FRAMER      framer_802154
00098 #define NETSTACK_CONF_RADIO       rf230_driver
00099 #define CHANNEL_802_15_4          26
00100 #define RF230_CONF_AUTOACK        1
00101 #define RF230_CONF_AUTORETRIES    2
00102 #define SICSLOWPAN_CONF_FRAG      1
00103 //Most browsers reissue GETs after 3 seconds which stops frag reassembly, longer MAXAGE does no good
00104 #define SICSLOWPAN_CONF_MAXAGE    3
00105 #define QUEUEBUF_CONF_NUM         1
00106 #define QUEUEBUF_CONF_REF_NUM     1
00107 /* Default uip_aligned_buf and sicslowpan_aligned_buf sizes of 1280 overflows RAM */
00108 #define UIP_CONF_BUFFER_SIZE    240
00109 
00110 #else
00111 /* Original combined RF230/mac code will not compile with current contiki stack */
00112 //#define PACKETBUF_CONF_HDR_SIZE    0            //RF230 handles headers internally
00113 /* 0 for IPv6, or 1 for HC1, 2 for HC01 */
00114 #define SICSLOWPAN_CONF_COMPRESSION_IPV6 0 
00115 #define SICSLOWPAN_CONF_COMPRESSION_HC1  1 
00116 #define SICSLOWPAN_CONF_COMPRESSION_HC01 2       //NB '2' is now HC06 in the core mac!
00117 //FTH081105
00118 #define SICSLOWPAN_CONF_COMPRESSION       SICSLOWPAN_CONF_COMPRESSION_HC01 
00119 #define SICSLOWPAN_CONF_MAXAGE 5
00120 #define UIP_CONF_LLH_LEN         14
00121 #endif /*RF230BB */
00122 
00123 #define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 2
00124 #define SICSLOWPAN_CONF_FRAG              1 
00125 
00126 #define UIP_CONF_LL_802154       1 
00127 
00128 #define UIP_CONF_MAX_CONNECTIONS 2
00129 #define UIP_CONF_MAX_LISTENPORTS 2
00130 #define UIP_CONF_UDP_CONNS       2
00131 
00132 #define UIP_CONF_IP_FORWARD      0
00133 #define UIP_CONF_FWCACHE_SIZE    0
00134 
00135 #define UIP_CONF_IPV6_CHECKS     1
00136 #define UIP_CONF_IPV6_QUEUE_PKT  0 
00137 #define UIP_CONF_IPV6_REASSEMBLY 0
00138 #define UIP_CONF_NETIF_MAX_ADDRESSES  3
00139 #define UIP_CONF_ND6_MAX_PREFIXES     3
00140 #define UIP_CONF_ND6_MAX_NEIGHBORS    4  
00141 #define UIP_CONF_ND6_MAX_DEFROUTERS   2
00142 #define UIP_CONF_UDP_CHECKSUMS   1
00143 #define UIP_CONF_TCP_SPLIT       1
00144 
00145 
00146 #include <stdint.h>
00147 
00148 typedef int32_t s32_t;
00149 typedef unsigned short clock_time_t;
00150 typedef unsigned char u8_t;
00151 typedef unsigned short u16_t;
00152 typedef unsigned long u32_t;
00153 typedef unsigned short uip_stats_t;
00154 typedef unsigned long off_t;
00155 
00156 void clock_delay(unsigned int us2);
00157 void clock_wait(int ms10);
00158 void clock_set_seconds(unsigned long s);
00159 unsigned long clock_seconds(void);
00160 
00161 #endif /* __CONTIKI_CONF_H__ */

Generated on Mon Apr 11 14:23:41 2011 for Contiki 2.5 by  doxygen 1.6.1