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-econotag.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 BRINC 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 1
88 #define MACA_AUTOACK 1
89 #define NULLRDC_CONF_802154_AUTOACK_HW 1
90 
91 #define USE_WDT 0
92 
93 #ifndef WDT_TIMEOUT
94 #define WDT_TIMEOUT 5000 /* watchdog timeout in ms */
95 #endif
96 
97 /* end of mc1322x specific config. */
98 
99 /* start of conitki config. */
100 #define PLATFORM_HAS_LEDS 1
101 #define PLATFORM_HAS_BUTTON 1
102 
103 /* Core rtimer.h defaults to 16 bit timer unless RTIMER_CLOCK_LT is defined */
104 typedef unsigned long rtimer_clock_t;
105 #define RTIMER_CLOCK_LT(a,b) ((signed long)((a)-(b)) < 0)
106 
107 #define RIMEADDR_CONF_SIZE 8
108 
109 /* EUI64 generation */
110 /* Organizationally Unique Identifier */
111 #define OUI 0xacde48 /* if IAB is defined then OUI = 0x0050C2 */
112 #define IAB 0xA8C /* IAB 0xA8C for use on Redwire products only */
113 //#undef IAB /* do not define an IAB if you are using a full OUI */
114 //#define EXT_ID 0xdef123 /* lower 12-bits used if IAB is defined */
115 #undef EXT_ID /* if an extention id is not defined then one will be generated randomly */
116 
117 #define FLASH_BLANK_ADDR /* if defined then the generated rime address will flashed */
118 
119 #if WITH_UIP6
120 /* Network setup for IPv6 */
121 #define NETSTACK_CONF_NETWORK sicslowpan_driver
122 #define NETSTACK_CONF_MAC nullmac_driver
123 /*#define NETSTACK_CONF_RDC contikimac_driver*/ /* contikimac for redbee hasn't been well tested */
124 #define NETSTACK_CONF_RDC nullrdc_driver
125 #define NETSTACK_CONF_RADIO contiki_maca_driver
126 #define NETSTACK_CONF_FRAMER framer_802154
127 
128 #define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE 8
129 #define RIME_CONF_NO_POLITE_ANNOUCEMENTS 0
130 #define CXMAC_CONF_ANNOUNCEMENTS 0
131 #define XMAC_CONF_ANNOUNCEMENTS 0
132 
133 #else /* WITH_UIP6 */
134 /* Network setup for non-IPv6 (rime). */
135 
136 #define NETSTACK_CONF_NETWORK rime_driver
137 #define NETSTACK_CONF_MAC csma_driver
138 #define NETSTACK_CONF_RDC sicslowmac_driver
139 #define NETSTACK_CONF_RADIO contiki_maca_driver
140 #define NETSTACK_CONF_FRAMER framer_802154
141 
142 #define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE 8
143 
144 #define COLLECT_CONF_ANNOUNCEMENTS 1
145 #define RIME_CONF_NO_POLITE_ANNOUCEMENTS 0
146 #define CXMAC_CONF_ANNOUNCEMENTS 0
147 #define XMAC_CONF_ANNOUNCEMENTS 0
148 #define CONTIKIMAC_CONF_ANNOUNCEMENTS 0
149 
150 #define CONTIKIMAC_CONF_COMPOWER 0
151 #define XMAC_CONF_COMPOWER 0
152 #define CXMAC_CONF_COMPOWER 0
153 
154 #define COLLECT_NEIGHBOR_CONF_MAX_NEIGHBORS 32
155 
156 #endif /* WITH_UIP6 */
157 
158 #define QUEUEBUF_CONF_NUM 16
159 
160 #define PACKETBUF_CONF_ATTRS_INLINE 1
161 
162 #ifndef RF_CHANNEL
163 #define RF_CHANNEL 26
164 #endif /* RF_CHANNEL */
165 
166 #define CONTIKIMAC_CONF_BROADCAST_RATE_LIMIT 0
167 
168 #define IEEE802154_CONF_PANID 0xABCD
169 
170 #define PROFILE_CONF_ON 0
171 #define ENERGEST_CONF_ON 0
172 
173 #define AODV_COMPLIANCE
174 #define AODV_NUM_RT_ENTRIES 32
175 
176 #define WITH_ASCII 1
177 
178 #define PROCESS_CONF_NUMEVENTS 8
179 #define PROCESS_CONF_STATS 1
180 
181 #ifdef WITH_UIP6
182 
183 #define RIMEADDR_CONF_SIZE 8
184 
185 #define UIP_CONF_LL_802154 1
186 #define UIP_CONF_LLH_LEN 0
187 
188 #define UIP_CONF_ROUTER 1
189 #define UIP_CONF_IPV6_RPL 1
190 
191 #define UIP_CONF_DS6_NBR_NBU 30
192 #define UIP_CONF_DS6_ROUTE_NBU 30
193 
194 #define UIP_CONF_ND6_SEND_RA 0
195 #define UIP_CONF_ND6_REACHABLE_TIME 600000
196 #define UIP_CONF_ND6_RETRANS_TIMER 10000
197 
198 #define UIP_CONF_IPV6 1
199 #define UIP_CONF_IPV6_QUEUE_PKT 0
200 #define UIP_CONF_IPV6_CHECKS 1
201 #define UIP_CONF_IPV6_REASSEMBLY 0
202 #define UIP_CONF_NETIF_MAX_ADDRESSES 3
203 #define UIP_CONF_ND6_MAX_PREFIXES 3
204 #define UIP_CONF_ND6_MAX_NEIGHBORS 4
205 #define UIP_CONF_ND6_MAX_DEFROUTERS 2
206 #define UIP_CONF_IP_FORWARD 0
207 #define UIP_CONF_BUFFER_SIZE 1300
208 #define SICSLOWPAN_CONF_FRAG 1
209 #define SICSLOWPAN_CONF_MAXAGE 8
210 
211 #define SICSLOWPAN_CONF_COMPRESSION_IPV6 0
212 #define SICSLOWPAN_CONF_COMPRESSION_HC1 1
213 #define SICSLOWPAN_CONF_COMPRESSION_HC01 2
214 #define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_COMPRESSION_HC06
215 #ifndef SICSLOWPAN_CONF_FRAG
216 #define SICSLOWPAN_CONF_FRAG 1
217 #define SICSLOWPAN_CONF_MAXAGE 8
218 #endif /* SICSLOWPAN_CONF_FRAG */
219 #define SICSLOWPAN_CONF_CONVENTIONAL_MAC 1
220 #define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 2
221 #else /* WITH_UIP6 */
222 #define UIP_CONF_IP_FORWARD 1
223 #define UIP_CONF_BUFFER_SIZE 1300
224 #endif /* WITH_UIP6 */
225 
226 #define UIP_CONF_ICMP_DEST_UNREACH 1
227 
228 #define UIP_CONF_DHCP_LIGHT
229 #define UIP_CONF_LLH_LEN 0
230 #define UIP_CONF_RECEIVE_WINDOW 48
231 #define UIP_CONF_TCP_MSS 48
232 #define UIP_CONF_MAX_CONNECTIONS 4
233 #define UIP_CONF_MAX_LISTENPORTS 8
234 #define UIP_CONF_UDP_CONNS 12
235 #define UIP_CONF_FWCACHE_SIZE 30
236 #define UIP_CONF_BROADCAST 1
237 #define UIP_ARCH_IPCHKSUM 1
238 #define UIP_CONF_UDP 1
239 #define UIP_CONF_UDP_CHECKSUMS 1
240 #define UIP_CONF_PINGADDRCONF 0
241 #define UIP_CONF_LOGGING 0
242 
243 #define UIP_CONF_TCP_SPLIT 0
244 
245 /* include the project config */
246 /* PROJECT_CONF_H might be defined in the project Makefile */
247 #ifdef PROJECT_CONF_H
248 #include PROJECT_CONF_H
249 #endif /* PROJECT_CONF_H */
250 
251 #endif /* __CONTIKI_CONF_H__ */