Contiki 3.x
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 Econotag
40  *
41  * \author
42  * Original by:
43  * Simon Barner <barner@in.tum.de>
44  * This version by:
45  * Mariano Alvira <mar@devl.org>
46  */
47 
48 #ifndef CONTIKI_CONF_H_
49 #define CONTIKI_CONF_H_
50 
51 #include <stdint.h>
52 
53 /* mc1322x files */
54 #include "contiki-mc1322x-conf.h"
55 
56 /* Econotag I tune parameters */
57 #define ECONOTAG_CTUNE_4PF 1
58 /* Coarse tune: add 0-15 pf (CTUNE is 4 bits) */
59 #define ECONOTAG_CTUNE 11
60 /* Fine tune: add FTUNE * 156fF (FTUNE is 5bits) */
61 #define ECONOTAG_FTUNE 7
62 
63 /* M12 tune parameters */
64 #define M12_CTUNE_4PF 1
65 #define M12_CTUNE 3
66 #define M12_FTUNE 3
67 
68 /* the econotag platform will correctly detect an Econotag I (no M12) vs. Econotag II (w/M12) */
69 /* and trim the main crystal accordingly */
70 /* this detection will be incorrect if you populate the 32.768kHz crystal on the Econotag I */
71 /* In that case, you should FORCE_ECONOTAG_I below */
72 #define FORCE_ECONOTAG_I 0
73 
74 /* if you define a serial number then it will be used to comput the mac address */
75 /* otherwise, a random mac address in the Redwire development IAB will be used */
76 /* #define M12_CONF_SERIAL 0x000000 */
77 
78 /* Clock ticks per second */
79 #define CLOCK_CONF_SECOND 100
80 
81 #define CCIF
82 #define CLIF
83 
84 #define CONSOLE_UART UART1
85 #define CONSOLE_BAUD 115200
86 
87 #define dbg_putchar(x) uart1_putc(x)
88 
89 #define USE_FORMATTED_STDIO 1
90 #define MACA_DEBUG 0
91 #define CONTIKI_MACA_RAW_MODE 0
92 
93 #define BLOCKING_TX 1
94 #define MACA_AUTOACK 1
95 #define NULLRDC_CONF_802154_AUTOACK_HW 1
96 
97 #define USE_WDT 0
98 
99 #ifndef WDT_TIMEOUT
100 #define WDT_TIMEOUT 5000 /* watchdog timeout in ms */
101 #endif
102 
103 /* end of mc1322x specific config. */
104 
105 /* start of conitki config. */
106 #define PLATFORM_HAS_LEDS 1
107 #define PLATFORM_HAS_BUTTON 1
108 
109 #define LINKADDR_CONF_SIZE 8
110 
111 #if WITH_UIP6
112 /* Network setup for IPv6 */
113 #define NETSTACK_CONF_NETWORK sicslowpan_driver
114 #define NETSTACK_CONF_MAC nullmac_driver
115 #define NETSTACK_CONF_RDC nullrdc_driver
116 #define NETSTACK_CONF_RADIO contiki_maca_driver
117 #define NETSTACK_CONF_FRAMER framer_802154
118 
119 #define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE 8
120 #define RIME_CONF_NO_POLITE_ANNOUCEMENTS 0
121 #define CXMAC_CONF_ANNOUNCEMENTS 0
122 #define XMAC_CONF_ANNOUNCEMENTS 0
123 
124 #else /* WITH_UIP6 */
125 /* Network setup for non-IPv6 (rime). */
126 
127 #define NETSTACK_CONF_NETWORK rime_driver
128 #define NETSTACK_CONF_MAC csma_driver
129 #define NETSTACK_CONF_RDC nullrdc_driver
130 #define NETSTACK_CONF_RADIO contiki_maca_driver
131 #define NETSTACK_CONF_FRAMER framer_802154
132 
133 #define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE 8
134 
135 #define COLLECT_CONF_ANNOUNCEMENTS 1
136 #define RIME_CONF_NO_POLITE_ANNOUCEMENTS 0
137 #define CXMAC_CONF_ANNOUNCEMENTS 0
138 #define XMAC_CONF_ANNOUNCEMENTS 0
139 #define CONTIKIMAC_CONF_ANNOUNCEMENTS 0
140 
141 #define CONTIKIMAC_CONF_COMPOWER 0
142 #define XMAC_CONF_COMPOWER 0
143 #define CXMAC_CONF_COMPOWER 0
144 
145 #define COLLECT_NBR_TABLE_CONF_MAX_NEIGHBORS 32
146 
147 #endif /* WITH_UIP6 */
148 
149 #define QUEUEBUF_CONF_NUM 16
150 
151 #define PACKETBUF_CONF_ATTRS_INLINE 1
152 
153 #ifndef RF_CHANNEL
154 #define RF_CHANNEL 26
155 #endif /* RF_CHANNEL */
156 
157 #define CONTIKIMAC_CONF_BROADCAST_RATE_LIMIT 0
158 
159 #define IEEE802154_CONF_PANID 0xABCD
160 
161 #define PROFILE_CONF_ON 0
162 #define ENERGEST_CONF_ON 0
163 
164 #define AODV_COMPLIANCE
165 #define AODV_NUM_RT_ENTRIES 32
166 
167 #define WITH_ASCII 1
168 
169 #define PROCESS_CONF_NUMEVENTS 8
170 #define PROCESS_CONF_STATS 1
171 
172 #ifdef WITH_UIP6
173 
174 #define LINKADDR_CONF_SIZE 8
175 
176 #define UIP_CONF_LL_802154 1
177 #define UIP_CONF_LLH_LEN 0
178 
179 #ifndef UIP_CONF_ROUTER
180 #define UIP_CONF_ROUTER 1
181 #endif
182 
183 #ifndef UIP_CONF_IPV6_RPL
184 #define UIP_CONF_IPV6_RPL 1
185 #endif
186 
187 #define NBR_TABLE_CONF_MAX_NEIGHBORS 30
188 #define UIP_CONF_MAX_ROUTES 30
189 
190 #define UIP_CONF_ND6_SEND_RA 0
191 #define UIP_CONF_ND6_REACHABLE_TIME 600000
192 #define UIP_CONF_ND6_RETRANS_TIMER 10000
193 
194 #define UIP_CONF_IPV6 1
195 #define UIP_CONF_IPV6_QUEUE_PKT 0
196 #define UIP_CONF_IPV6_CHECKS 1
197 #define UIP_CONF_IPV6_REASSEMBLY 0
198 #define UIP_CONF_NETIF_MAX_ADDRESSES 3
199 #define UIP_CONF_ND6_MAX_PREFIXES 3
200 #define UIP_CONF_ND6_MAX_DEFROUTERS 2
201 #define UIP_CONF_IP_FORWARD 0
202 #define UIP_CONF_BUFFER_SIZE 1300
203 #define SICSLOWPAN_CONF_FRAG 1
204 #define SICSLOWPAN_CONF_MAXAGE 8
205 
206 #define SICSLOWPAN_CONF_COMPRESSION_IPV6 0
207 #define SICSLOWPAN_CONF_COMPRESSION_HC1 1
208 #define SICSLOWPAN_CONF_COMPRESSION_HC01 2
209 #define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_COMPRESSION_HC06
210 #ifndef SICSLOWPAN_CONF_FRAG
211 #define SICSLOWPAN_CONF_FRAG 1
212 #define SICSLOWPAN_CONF_MAXAGE 8
213 #endif /* SICSLOWPAN_CONF_FRAG */
214 #define SICSLOWPAN_CONF_CONVENTIONAL_MAC 1
215 #define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 2
216 #else /* WITH_UIP6 */
217 #define UIP_CONF_IP_FORWARD 1
218 #define UIP_CONF_BUFFER_SIZE 1300
219 #endif /* WITH_UIP6 */
220 
221 #define UIP_CONF_ICMP_DEST_UNREACH 1
222 
223 #define UIP_CONF_DHCP_LIGHT
224 #define UIP_CONF_LLH_LEN 0
225 #define UIP_CONF_RECEIVE_WINDOW 48
226 #define UIP_CONF_TCP_MSS 48
227 #define UIP_CONF_MAX_CONNECTIONS 4
228 #define UIP_CONF_MAX_LISTENPORTS 8
229 #define UIP_CONF_UDP_CONNS 12
230 #define UIP_CONF_FWCACHE_SIZE 30
231 #define UIP_CONF_BROADCAST 1
232 #define UIP_ARCH_IPCHKSUM 1
233 #define UIP_CONF_UDP 1
234 #define UIP_CONF_UDP_CHECKSUMS 1
235 #define UIP_CONF_PINGADDRCONF 0
236 #define UIP_CONF_LOGGING 0
237 
238 #define UIP_CONF_TCP_SPLIT 0
239 
240 /* include the project config */
241 /* PROJECT_CONF_H might be defined in the project Makefile */
242 #ifdef PROJECT_CONF_H
243 #include PROJECT_CONF_H
244 #endif /* PROJECT_CONF_H */
245 
246 #endif /* CONTIKI_CONF_H_ */