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 #include "platform-conf.h"
35 
36 #define XMAC_CONF_COMPOWER 1
37 #define CXMAC_CONF_COMPOWER 1
38 
39 #if NETSTACK_CONF_WITH_IPV6
40 
41 /* Network setup for IPv6 */
42 #define NETSTACK_CONF_NETWORK sicslowpan_driver
43 #define NETSTACK_CONF_MAC csma_driver
44 #define NETSTACK_CONF_RDC contikimac_driver
45 #define NETSTACK_CONF_RADIO cc2420_driver
46 #define NETSTACK_CONF_FRAMER framer_802154
47 
48 /* Specify a minimum packet size for 6lowpan compression to be
49  enabled. This is needed for ContikiMAC, which needs packets to be
50  larger than a specified size, if no ContikiMAC header should be
51  used. */
52 #define SICSLOWPAN_CONF_COMPRESSION_THRESHOLD 63
53 
54 #define CC2420_CONF_AUTOACK 1
55 #define NETSTACK_RDC_CHANNEL_CHECK_RATE 8
56 #define RIME_CONF_NO_POLITE_ANNOUCEMENTS 0
57 #define CXMAC_CONF_ANNOUNCEMENTS 0
58 #define XMAC_CONF_ANNOUNCEMENTS 0
59 
60 #define QUEUEBUF_CONF_NUM 4
61 
62 #else /* NETSTACK_CONF_WITH_IPV6 */
63 
64 /* Network setup for non-IPv6 (rime). */
65 
66 #define NETSTACK_CONF_NETWORK rime_driver
67 #define NETSTACK_CONF_MAC csma_driver
68 #define NETSTACK_CONF_RDC contikimac_driver
69 #define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE 8
70 #define NETSTACK_CONF_FRAMER contikimac_framer
71 
72 #define CC2420_CONF_AUTOACK 1
73 
74 #define COLLECT_CONF_ANNOUNCEMENTS 1
75 #define RIME_CONF_NO_POLITE_ANNOUCEMENTS 0
76 #define CXMAC_CONF_ANNOUNCEMENTS 0
77 #define XMAC_CONF_ANNOUNCEMENTS 0
78 #define CONTIKIMAC_CONF_ANNOUNCEMENTS 0
79 
80 #define CONTIKIMAC_CONF_COMPOWER 1
81 #define XMAC_CONF_COMPOWER 1
82 #define CXMAC_CONF_COMPOWER 1
83 
84 #define COLLECT_NBR_TABLE_CONF_MAX_NEIGHBORS 32
85 
86 #define QUEUEBUF_CONF_NUM 8
87 
88 #endif /* NETSTACK_CONF_WITH_IPV6 */
89 
90 #define PACKETBUF_CONF_ATTRS_INLINE 1
91 
92 #ifdef RF_CHANNEL
93 #define CC2420_CONF_CHANNEL RF_CHANNEL
94 #endif
95 
96 #ifndef CC2420_CONF_CHANNEL
97 #define CC2420_CONF_CHANNEL 26
98 #endif /* CC2420_CONF_CHANNEL */
99 
100 #ifndef CC2420_CONF_CCA_THRESH
101 #define CC2420_CONF_CCA_THRESH -45
102 #endif /* CC2420_CONF_CCA_THRESH */
103 
104 #define IEEE802154_CONF_PANID 0xABCD
105 
106 /* The TSCH default slot length of 10ms is a bit too short for this platform,
107  * use 15ms instead. */
108 #define TSCH_CONF_DEFAULT_TIMESLOT_LENGTH 15000
109 
110 #define SHELL_VARS_CONF_RAM_BEGIN 0x1100
111 #define SHELL_VARS_CONF_RAM_END 0x2000
112 
113 #define CFS_CONF_OFFSET_TYPE long
114 
115 #define PROFILE_CONF_ON 0
116 #define ENERGEST_CONF_ON 1
117 
118 #define ELFLOADER_CONF_TEXT_IN_ROM 0
119 #define ELFLOADER_CONF_DATAMEMORY_SIZE 0x400
120 #define ELFLOADER_CONF_TEXTMEMORY_SIZE 0x800
121 
122 #define AODV_COMPLIANCE
123 #define AODV_NUM_RT_ENTRIES 32
124 
125 #define WITH_ASCII 1
126 
127 #define PROCESS_CONF_NUMEVENTS 8
128 #define PROCESS_CONF_STATS 1
129 /*#define PROCESS_CONF_FASTPOLL 4*/
130 
131 #define UART0_CONF_TX_WITH_INTERRUPT 0 /* So far, printfs without interrupt. */
132 
133 #define UART0_CONF_RX_WITH_DMA 0
134 
135 #ifdef NETSTACK_CONF_WITH_IPV6
136 
137 #define LINKADDR_CONF_SIZE 8
138 
139 #define UIP_CONF_LL_802154 1
140 #define UIP_CONF_LLH_LEN 0
141 
142 #define UIP_CONF_ROUTER 1
143 
144 /* Handle 10 neighbors */
145 #define NBR_TABLE_CONF_MAX_NEIGHBORS 15
146 /* Handle 10 routes */
147 #define UIP_CONF_MAX_ROUTES 15
148 
149 #define UIP_CONF_ND6_SEND_RA 0
150 #define UIP_CONF_ND6_REACHABLE_TIME 600000
151 #define UIP_CONF_ND6_RETRANS_TIMER 10000
152 
153 #define NETSTACK_CONF_WITH_IPV6 1
154 #define UIP_CONF_IPV6_QUEUE_PKT 0
155 #define UIP_CONF_IPV6_CHECKS 1
156 #define UIP_CONF_IPV6_REASSEMBLY 0
157 #define UIP_CONF_NETIF_MAX_ADDRESSES 3
158 #define UIP_CONF_IP_FORWARD 0
159 #define UIP_CONF_BUFFER_SIZE 140
160 
161 #define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_COMPRESSION_HC06
162 #ifndef SICSLOWPAN_CONF_FRAG
163 #define SICSLOWPAN_CONF_FRAG 1
164 #define SICSLOWPAN_CONF_MAXAGE 8
165 #endif /* SICSLOWPAN_CONF_FRAG */
166 #define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 2
167 #else /* NETSTACK_CONF_WITH_IPV6 */
168 #define UIP_CONF_IP_FORWARD 1
169 #define UIP_CONF_BUFFER_SIZE 108
170 #endif /* NETSTACK_CONF_WITH_IPV6 */
171 
172 #define UIP_CONF_ICMP_DEST_UNREACH 1
173 
174 #define UIP_CONF_DHCP_LIGHT
175 #define UIP_CONF_LLH_LEN 0
176 #define UIP_CONF_RECEIVE_WINDOW 48
177 #define UIP_CONF_TCP_MSS 48
178 #define UIP_CONF_MAX_CONNECTIONS 4
179 #define UIP_CONF_MAX_LISTENPORTS 8
180 #define UIP_CONF_UDP_CONNS 12
181 #define UIP_CONF_FWCACHE_SIZE 30
182 #define UIP_CONF_BROADCAST 1
183 #define UIP_ARCH_IPCHKSUM 1
184 #define UIP_CONF_UDP 1
185 #define UIP_CONF_UDP_CHECKSUMS 1
186 #define UIP_CONF_PINGADDRCONF 0
187 #define UIP_CONF_LOGGING 0
188 
189 #define UIP_CONF_TCP_SPLIT 0
190 
191 #ifdef PROJECT_CONF_H
192 #include PROJECT_CONF_H
193 #endif /* PROJECT_CONF_H */
194 
195 #endif /* CONTIKI_CONF_H */
Platform configuration for the Z1 platform