Contiki 2.5
contiki-conf.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010, Mariano Alvira <mar@devl.org> and other contributors
3  * to the MC1322x project (http://mc1322x.devl.org) and Contiki.
4  *
5  * Copyright (c) 2006, Technical University of Munich
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  * 1. Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * 2. Redistributions in binary form must reproduce the above copyright
14  * notice, this list of conditions and the following disclaimer in the
15  * documentation and/or other materials provided with the distribution.
16  * 3. Neither the name of the Institute nor the names of its contributors
17  * may be used to endorse or promote products derived from this software
18  * without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
21  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23  * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
24  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30  * SUCH DAMAGE.
31  *
32  * This file is part of the Contiki operating system.
33  *
34  * @(#)$$
35  */
36 
37 /**
38  * \file
39  * Configuration for MC1322x hobby board based on
40  * Configuration for sample STK 501 Contiki kernel
41  *
42  * \author
43  * Originial by:
44  * Simon Barner <barner@in.tum.de
45  * This version by:
46  * Mariano Alvira <mar@devl.org>
47  */
48 
49 #ifndef __CONTIKI_CONF_H__
50 #define __CONTIKI_CONF_H__
51 
52 #include <stdint.h>
53 
54 /* mc1322x files */
55 #include "contiki-mc1322x-conf.h"
56 /* this is from cpu/mc1322x/board */
57 #include "redbee-dev.h"
58 
59 /* Clock ticks per second */
60 #define CLOCK_CONF_SECOND 100
61 /* set to 1 to toggle the green led ever second */
62 /* FIXME setting this will break the sensor button (and other gpio) */
63 /* since leds_arch hits the entire gpio_data */
64 #define BLINK_SECONDS 0
65 
66 #define CCIF
67 #define CLIF
68 
69 /* Baud rate */
70 #define BRMOD 9999
71 /* 230400 bps, INC=767, MOD=9999, 24Mhz 16x samp */
72 /* 115200 bps, INC=767, MOD=9999, 24Mhz 8x samp */
73 #define BRINC 767
74 /* 921600 bps, MOD=9999, 24Mhz 16x samp */
75 //#define INC 3071
76 #define SAMP UCON_SAMP_8X
77 //#define SAMP UCON_SAMP_16X
78 
79 #define uart_init uart1_init
80 #define dbg_putchar(x) uart1_putc(x)
81 
82 #define USE_FORMATTED_STDIO 1
83 #define MACA_DEBUG 0
84 #define CONTIKI_MACA_RAW_MODE 0
85 #define USE_32KHZ_XTAL 0
86 
87 #define BLOCKING_TX 0
88 
89 /* end of mc1322x specific config. */
90 
91 /* start of conitki config. */
92 
93 /* Core rtimer.h defaults to 16 bit timer unless RTIMER_CLOCK_LT is defined */
94 typedef unsigned long rtimer_clock_t;
95 #define RTIMER_CLOCK_LT(a,b) ((signed long)((a)-(b)) < 0)
96 
97 #define RIMEADDR_CONF_SIZE 8
98 
99 /* EUI64 generation */
100 /* Organizationally Unique Identifier */
101 #define OUI 0xacde48 /* if IAB is defined then OUI = 0x0050C2 */
102 #define IAB 0xA8C /* IAB 0xA8C for use on Redwire products only */
103 //#undef IAB /* do not define an IAB if you are using a full OUI */
104 //#define EXT_ID 0xdef123 /* lower 12-bits used if IAB is defined */
105 #undef EXT_ID /* if an extention id is not defined then one will be generated randomly */
106 
107 #define FLASH_BLANK_ADDR /* if defined then the generated rime address will flashed */
108 
109 #if WITH_UIP6
110 /* Network setup for IPv6 */
111 #define NETSTACK_CONF_NETWORK sicslowpan_driver
112 #define NETSTACK_CONF_MAC nullmac_driver
113 /*#define NETSTACK_CONF_RDC contikimac_driver*/ /* contikimac for redbee hasn't been well tested */
114 #define NETSTACK_CONF_RDC nullrdc_driver
115 #define NETSTACK_CONF_RADIO contiki_maca_driver
116 #define NETSTACK_CONF_FRAMER framer_802154
117 
118 #define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE 8
119 #define RIME_CONF_NO_POLITE_ANNOUCEMENTS 0
120 #define CXMAC_CONF_ANNOUNCEMENTS 0
121 #define XMAC_CONF_ANNOUNCEMENTS 0
122 
123 #else /* WITH_UIP6 */
124 /* Network setup for non-IPv6 (rime). */
125 
126 #define NETSTACK_CONF_NETWORK rime_driver
127 #define NETSTACK_CONF_MAC csma_driver
128 #define NETSTACK_CONF_RDC sicslowmac_driver
129 #define NETSTACK_CONF_RADIO contiki_maca_driver
130 #define NETSTACK_CONF_FRAMER framer_802154
131 
132 #define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE 8
133 
134 #define COLLECT_CONF_ANNOUNCEMENTS 1
135 #define RIME_CONF_NO_POLITE_ANNOUCEMENTS 0
136 #define CXMAC_CONF_ANNOUNCEMENTS 0
137 #define XMAC_CONF_ANNOUNCEMENTS 0
138 #define CONTIKIMAC_CONF_ANNOUNCEMENTS 0
139 
140 #define CONTIKIMAC_CONF_COMPOWER 0
141 #define XMAC_CONF_COMPOWER 0
142 #define CXMAC_CONF_COMPOWER 0
143 
144 #define COLLECT_NEIGHBOR_CONF_MAX_NEIGHBORS 32
145 
146 #endif /* WITH_UIP6 */
147 
148 #define QUEUEBUF_CONF_NUM 16
149 
150 #define PACKETBUF_CONF_ATTRS_INLINE 1
151 
152 #ifndef RF_CHANNEL
153 #define RF_CHANNEL 26
154 #endif /* RF_CHANNEL */
155 
156 #define CONTIKIMAC_CONF_BROADCAST_RATE_LIMIT 0
157 
158 #define IEEE802154_CONF_PANID 0xABCD
159 
160 #define PROFILE_CONF_ON 0
161 #define ENERGEST_CONF_ON 0
162 
163 #define AODV_COMPLIANCE
164 #define AODV_NUM_RT_ENTRIES 32
165 
166 #define WITH_ASCII 1
167 
168 #define PROCESS_CONF_NUMEVENTS 8
169 #define PROCESS_CONF_STATS 1
170 
171 #ifdef WITH_UIP6
172 
173 #define RIMEADDR_CONF_SIZE 8
174 
175 #define UIP_CONF_LL_802154 1
176 #define UIP_CONF_LLH_LEN 0
177 
178 #define UIP_CONF_ROUTER 1
179 #define UIP_CONF_IPV6_RPL 1
180 
181 #define UIP_CONF_DS6_NBR_NBU 30
182 #define UIP_CONF_DS6_ROUTE_NBU 30
183 
184 #define UIP_CONF_ND6_SEND_RA 0
185 #define UIP_CONF_ND6_REACHABLE_TIME 600000
186 #define UIP_CONF_ND6_RETRANS_TIMER 10000
187 
188 #define UIP_CONF_IPV6 1
189 #define UIP_CONF_IPV6_QUEUE_PKT 0
190 #define UIP_CONF_IPV6_CHECKS 1
191 #define UIP_CONF_IPV6_REASSEMBLY 0
192 #define UIP_CONF_NETIF_MAX_ADDRESSES 3
193 #define UIP_CONF_ND6_MAX_PREFIXES 3
194 #define UIP_CONF_ND6_MAX_NEIGHBORS 4
195 #define UIP_CONF_ND6_MAX_DEFROUTERS 2
196 #define UIP_CONF_IP_FORWARD 0
197 #define UIP_CONF_BUFFER_SIZE 1300
198 #define SICSLOWPAN_CONF_FRAG 1
199 #define SICSLOWPAN_CONF_MAXAGE 8
200 
201 #define SICSLOWPAN_CONF_COMPRESSION_IPV6 0
202 #define SICSLOWPAN_CONF_COMPRESSION_HC1 1
203 #define SICSLOWPAN_CONF_COMPRESSION_HC01 2
204 #define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_COMPRESSION_HC06
205 #ifndef SICSLOWPAN_CONF_FRAG
206 #define SICSLOWPAN_CONF_FRAG 1
207 #define SICSLOWPAN_CONF_MAXAGE 8
208 #endif /* SICSLOWPAN_CONF_FRAG */
209 #define SICSLOWPAN_CONF_CONVENTIONAL_MAC 1
210 #define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 2
211 #else /* WITH_UIP6 */
212 #define UIP_CONF_IP_FORWARD 1
213 #define UIP_CONF_BUFFER_SIZE 1300
214 #endif /* WITH_UIP6 */
215 
216 #define UIP_CONF_ICMP_DEST_UNREACH 1
217 
218 #define UIP_CONF_DHCP_LIGHT
219 #define UIP_CONF_LLH_LEN 0
220 #define UIP_CONF_RECEIVE_WINDOW 48
221 #define UIP_CONF_TCP_MSS 48
222 #define UIP_CONF_MAX_CONNECTIONS 4
223 #define UIP_CONF_MAX_LISTENPORTS 8
224 #define UIP_CONF_UDP_CONNS 12
225 #define UIP_CONF_FWCACHE_SIZE 30
226 #define UIP_CONF_BROADCAST 1
227 #define UIP_ARCH_IPCHKSUM 1
228 #define UIP_CONF_UDP 1
229 #define UIP_CONF_UDP_CHECKSUMS 1
230 #define UIP_CONF_PINGADDRCONF 0
231 #define UIP_CONF_LOGGING 0
232 
233 #define UIP_CONF_TCP_SPLIT 0
234 
235 /* include the project config */
236 /* PROJECT_CONF_H might be defined in the project Makefile */
237 #ifdef PROJECT_CONF_H
238 #include PROJECT_CONF_H
239 #endif /* PROJECT_CONF_H */
240 
241 #endif /* __CONTIKI_CONF_H__ */