Contiki 3.x
contiki-conf.h
1 /*
2  * Copyright (c) 2010, Swedish Institute of Computer Science.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  * 3. Neither the name of the Institute nor the names of its contributors
14  * may be used to endorse or promote products derived from this software
15  * without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
21  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27  * SUCH DAMAGE.
28  *
29  */
30 
31 #ifndef CONTIKI_CONF_H
32 #define CONTIKI_CONF_H
33 
34 
35 #include "platform-conf.h"
36 
37 #define XMAC_CONF_COMPOWER 1
38 #define CXMAC_CONF_COMPOWER 1
39 
40 #if WITH_UIP6
41 
42 /* Network setup for IPv6 */
43 #define NETSTACK_CONF_NETWORK sicslowpan_driver
44 #define NETSTACK_CONF_MAC csma_driver
45 #define NETSTACK_CONF_RDC contikimac_driver
46 #define NETSTACK_CONF_RADIO cc2420_driver
47 #define NETSTACK_CONF_FRAMER framer_802154
48 
49 /* Specify a minimum packet size for 6lowpan compression to be
50  enabled. This is needed for ContikiMAC, which needs packets to be
51  larger than a specified size, if no ContikiMAC header should be
52  used. */
53 #define SICSLOWPAN_CONF_COMPRESSION_THRESHOLD 63
54 
55 #define CC2420_CONF_AUTOACK 1
56 #define NETSTACK_RDC_CHANNEL_CHECK_RATE 8
57 #define RIME_CONF_NO_POLITE_ANNOUCEMENTS 0
58 #define CXMAC_CONF_ANNOUNCEMENTS 0
59 #define XMAC_CONF_ANNOUNCEMENTS 0
60 
61 #define QUEUEBUF_CONF_NUM 4
62 
63 
64 #else /* WITH_UIP6 */
65 
66 /* Network setup for non-IPv6 (rime). */
67 
68 #define NETSTACK_CONF_NETWORK rime_driver
69 #define NETSTACK_CONF_MAC csma_driver
70 #define NETSTACK_CONF_RDC contikimac_driver
71 #define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE 8
72 #define NETSTACK_CONF_FRAMER framer_802154
73 
74 #define CC2420_CONF_AUTOACK 1
75 
76 #define COLLECT_CONF_ANNOUNCEMENTS 1
77 #define RIME_CONF_NO_POLITE_ANNOUCEMENTS 0
78 #define CXMAC_CONF_ANNOUNCEMENTS 0
79 #define XMAC_CONF_ANNOUNCEMENTS 0
80 #define CONTIKIMAC_CONF_ANNOUNCEMENTS 0
81 
82 #define CONTIKIMAC_CONF_COMPOWER 1
83 #define XMAC_CONF_COMPOWER 1
84 #define CXMAC_CONF_COMPOWER 1
85 
86 #define COLLECT_NBR_TABLE_CONF_MAX_NEIGHBORS 32
87 
88 #define QUEUEBUF_CONF_NUM 8
89 
90 #endif /* WITH_UIP6 */
91 
92 #define PACKETBUF_CONF_ATTRS_INLINE 1
93 
94 #ifdef RF_CHANNEL
95 #define CC2420_CONF_CHANNEL RF_CHANNEL
96 #endif
97 
98 #ifndef CC2420_CONF_CHANNEL
99 #define CC2420_CONF_CHANNEL 26
100 #endif /* CC2420_CONF_CHANNEL */
101 
102 #ifndef CC2420_CONF_CCA_THRESH
103 #define CC2420_CONF_CCA_THRESH -45
104 #endif /* CC2420_CONF_CCA_THRESH */
105 
106 #define IEEE802154_CONF_PANID 0xABCD
107 
108 #define SHELL_VARS_CONF_RAM_BEGIN 0x1100
109 #define SHELL_VARS_CONF_RAM_END 0x2000
110 
111 
112 #define CFS_CONF_OFFSET_TYPE long
113 
114 #define PROFILE_CONF_ON 0
115 #define ENERGEST_CONF_ON 1
116 
117 #define ELFLOADER_CONF_TEXT_IN_ROM 0
118 #define ELFLOADER_CONF_DATAMEMORY_SIZE 0x400
119 #define ELFLOADER_CONF_TEXTMEMORY_SIZE 0x800
120 
121 #define AODV_COMPLIANCE
122 #define AODV_NUM_RT_ENTRIES 32
123 
124 #define WITH_ASCII 1
125 
126 #define PROCESS_CONF_NUMEVENTS 8
127 #define PROCESS_CONF_STATS 1
128 /*#define PROCESS_CONF_FASTPOLL 4*/
129 
130 
131 #define UART0_CONF_TX_WITH_INTERRUPT 0 // So far, printfs without interrupt.
132 
133 #ifdef WITH_UIP6
134 
135 #define LINKADDR_CONF_SIZE 8
136 
137 #define UIP_CONF_LL_802154 1
138 #define UIP_CONF_LLH_LEN 0
139 
140 #define UIP_CONF_ROUTER 1
141 #define UIP_CONF_IPV6_RPL 1
142 
143 /* Handle 10 neighbors */
144 #define NBR_TABLE_CONF_MAX_NEIGHBORS 15
145 /* Handle 10 routes */
146 #define UIP_CONF_MAX_ROUTES 15
147 
148 #define UIP_CONF_ND6_SEND_RA 0
149 #define UIP_CONF_ND6_REACHABLE_TIME 600000
150 #define UIP_CONF_ND6_RETRANS_TIMER 10000
151 
152 #define UIP_CONF_IPV6 1
153 #define UIP_CONF_IPV6_QUEUE_PKT 0
154 #define UIP_CONF_IPV6_CHECKS 1
155 #define UIP_CONF_IPV6_REASSEMBLY 0
156 #define UIP_CONF_NETIF_MAX_ADDRESSES 3
157 #define UIP_CONF_ND6_MAX_PREFIXES 3
158 #define UIP_CONF_ND6_MAX_DEFROUTERS 2
159 #define UIP_CONF_IP_FORWARD 0
160 #define UIP_CONF_BUFFER_SIZE 140
161 
162 #define SICSLOWPAN_CONF_COMPRESSION_IPV6 0
163 #define SICSLOWPAN_CONF_COMPRESSION_HC1 1
164 #define SICSLOWPAN_CONF_COMPRESSION_HC01 2
165 #define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_COMPRESSION_HC06
166 #ifndef SICSLOWPAN_CONF_FRAG
167 #define SICSLOWPAN_CONF_FRAG 1
168 #define SICSLOWPAN_CONF_MAXAGE 8
169 #endif /* SICSLOWPAN_CONF_FRAG */
170 #define SICSLOWPAN_CONF_CONVENTIONAL_MAC 1
171 #define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 2
172 #else /* WITH_UIP6 */
173 #define UIP_CONF_IP_FORWARD 1
174 #define UIP_CONF_BUFFER_SIZE 108
175 #endif /* WITH_UIP6 */
176 
177 #define UIP_CONF_ICMP_DEST_UNREACH 1
178 
179 #define UIP_CONF_DHCP_LIGHT
180 #define UIP_CONF_LLH_LEN 0
181 #define UIP_CONF_RECEIVE_WINDOW 48
182 #define UIP_CONF_TCP_MSS 48
183 #define UIP_CONF_MAX_CONNECTIONS 4
184 #define UIP_CONF_MAX_LISTENPORTS 8
185 #define UIP_CONF_UDP_CONNS 12
186 #define UIP_CONF_FWCACHE_SIZE 30
187 #define UIP_CONF_BROADCAST 1
188 #define UIP_ARCH_IPCHKSUM 1
189 #define UIP_CONF_UDP 1
190 #define UIP_CONF_UDP_CHECKSUMS 1
191 #define UIP_CONF_PINGADDRCONF 0
192 #define UIP_CONF_LOGGING 0
193 
194 #define UIP_CONF_TCP_SPLIT 0
195 
196 
197 #ifdef PROJECT_CONF_H
198 #include PROJECT_CONF_H
199 #endif /* PROJECT_CONF_H */
200 
201 
202 
203 #endif /* CONTIKI_CONF_H */
Platform configuration for the Z1 platform