Contiki 3.x
contiki-conf.h
1 /*
2  * Copyright (c) 2014, Analog Devices, Inc.
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  *
14  * 3. Neither the name of the copyright holder nor the names of its
15  * contributors may be used to endorse or promote products derived
16  * from this software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22  * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
27  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
29  * OF THE POSSIBILITY OF SUCH DAMAGE.
30  */
31 /**
32  * \author Ian Martin <martini@redwirellc.com>
33  */
34 
35 #ifndef __CONTIKI_CONF_H__
36 #define __CONTIKI_CONF_H__
37 
38 #include <stdint.h>
39 
40 #include "rl78.h"
41 #include "platform-conf.h"
42 
43 /* Clock ticks per second */
44 #define CLOCK_CONF_SECOND (f_CLK >> CLOCK_SCALER)
45 
46 #define CCIF
47 #define CLIF
48 
49 #define dbg_putchar(x) uart0_putchar(x)
50 
51 #define USE_FORMATTED_STDIO 1
52 
53 #define NULLRDC_CONF_802154_AUTOACK_HW 1
54 
55 /* start of conitki config. */
56 #define PLATFORM_HAS_LEDS 0 /* TODO */
57 #define PLATFORM_HAS_BUTTON 1
58 
59 #define LINKADDR_CONF_SIZE 8
60 
61 #if WITH_UIP6
62 /* Network setup for IPv6 */
63 #define NETSTACK_CONF_NETWORK sicslowpan_driver
64 #define NETSTACK_CONF_MAC nullmac_driver
65 #define NETSTACK_CONF_RDC nullrdc_driver
66 #define NETSTACK_CONF_RADIO adf7023_driver
67 #define NETSTACK_CONF_FRAMER framer_802154
68 
69 #define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE 8
70 #define RIME_CONF_NO_POLITE_ANNOUCEMENTS 0
71 #define CXMAC_CONF_ANNOUNCEMENTS 0
72 #define XMAC_CONF_ANNOUNCEMENTS 0
73 
74 #else /* WITH_UIP6 */
75 /* Network setup for non-IPv6 (rime). */
76 
77 #define NETSTACK_CONF_NETWORK rime_driver
78 #define NETSTACK_CONF_MAC csma_driver
79 #define NETSTACK_CONF_RDC nullrdc_driver
80 #define NETSTACK_CONF_RADIO adf7023_driver
81 #define NETSTACK_CONF_FRAMER framer_802154
82 
83 #define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE 8
84 
85 #define COLLECT_CONF_ANNOUNCEMENTS 1
86 #define RIME_CONF_NO_POLITE_ANNOUCEMENTS 0
87 #define CXMAC_CONF_ANNOUNCEMENTS 0
88 #define XMAC_CONF_ANNOUNCEMENTS 0
89 #define CONTIKIMAC_CONF_ANNOUNCEMENTS 0
90 
91 #define CONTIKIMAC_CONF_COMPOWER 0
92 #define XMAC_CONF_COMPOWER 0
93 #define CXMAC_CONF_COMPOWER 0
94 
95 #define COLLECT_NBR_TABLE_CONF_MAX_NEIGHBORS 32
96 
97 #endif /* WITH_UIP6 */
98 
99 #define QUEUEBUF_CONF_NUM 16
100 
101 #define PACKETBUF_CONF_ATTRS_INLINE 1
102 
103 #ifndef RF_CHANNEL
104 #define RF_CHANNEL 26
105 #endif /* RF_CHANNEL */
106 
107 #define CONTIKIMAC_CONF_BROADCAST_RATE_LIMIT 0
108 
109 #define IEEE802154_CONF_PANID 0xABCD
110 
111 #define PROFILE_CONF_ON 0
112 #define ENERGEST_CONF_ON 0
113 
114 #define AODV_COMPLIANCE
115 #define AODV_NUM_RT_ENTRIES 32
116 
117 #define WITH_ASCII 1
118 
119 #define PROCESS_CONF_NUMEVENTS 8
120 #define PROCESS_CONF_STATS 1
121 
122 #ifdef WITH_UIP6
123 
124 #define LINKADDR_CONF_SIZE 8
125 
126 #define UIP_CONF_LL_802154 1
127 #define UIP_CONF_LLH_LEN 0
128 
129 #ifndef UIP_CONF_ROUTER
130 #define UIP_CONF_ROUTER 1
131 #endif
132 
133 #ifndef UIP_CONF_IPV6_RPL
134 #define UIP_CONF_IPV6_RPL 1
135 #endif
136 
137 #define NBR_TABLE_CONF_MAX_NEIGHBORS 30
138 #define UIP_CONF_MAX_ROUTES 30
139 
140 #define UIP_CONF_ND6_SEND_RA 0
141 #define UIP_CONF_ND6_REACHABLE_TIME 600000
142 #define UIP_CONF_ND6_RETRANS_TIMER 10000
143 
144 #define UIP_CONF_IPV6 1
145 #define UIP_CONF_IPV6_QUEUE_PKT 0
146 #define UIP_CONF_IPV6_CHECKS 1
147 #define UIP_CONF_IPV6_REASSEMBLY 0
148 #define UIP_CONF_NETIF_MAX_ADDRESSES 3
149 #define UIP_CONF_ND6_MAX_PREFIXES 3
150 #define UIP_CONF_ND6_MAX_DEFROUTERS 2
151 #define UIP_CONF_IP_FORWARD 0
152 #define UIP_CONF_BUFFER_SIZE 1300
153 #define SICSLOWPAN_CONF_FRAG 1
154 #define SICSLOWPAN_CONF_MAXAGE 8
155 
156 #define SICSLOWPAN_CONF_COMPRESSION_IPV6 0
157 #define SICSLOWPAN_CONF_COMPRESSION_HC1 1
158 #define SICSLOWPAN_CONF_COMPRESSION_HC01 2
159 #define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_COMPRESSION_HC06
160 #ifndef SICSLOWPAN_CONF_FRAG
161 #define SICSLOWPAN_CONF_FRAG 1
162 #define SICSLOWPAN_CONF_MAXAGE 8
163 #endif /* SICSLOWPAN_CONF_FRAG */
164 #define SICSLOWPAN_CONF_CONVENTIONAL_MAC 1
165 #define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 2
166 #else /* WITH_UIP6 */
167 #define UIP_CONF_IP_FORWARD 1
168 #define UIP_CONF_BUFFER_SIZE 1300
169 #endif /* WITH_UIP6 */
170 
171 #define UIP_CONF_ICMP_DEST_UNREACH 1
172 
173 #define UIP_CONF_DHCP_LIGHT
174 #define UIP_CONF_LLH_LEN 0
175 #define UIP_CONF_RECEIVE_WINDOW 48
176 #define UIP_CONF_TCP_MSS 48
177 #define UIP_CONF_MAX_CONNECTIONS 4
178 #define UIP_CONF_MAX_LISTENPORTS 8
179 #define UIP_CONF_UDP_CONNS 12
180 #define UIP_CONF_FWCACHE_SIZE 30
181 #define UIP_CONF_BROADCAST 1
182 #define UIP_CONF_UDP 1
183 #define UIP_CONF_UDP_CHECKSUMS 1
184 #define UIP_CONF_PINGADDRCONF 0
185 #define UIP_CONF_LOGGING 0
186 
187 #define UIP_CONF_TCP_SPLIT 0
188 
189 /* include the project config */
190 /* PROJECT_CONF_H might be defined in the project Makefile */
191 #ifdef PROJECT_CONF_H
192 #include PROJECT_CONF_H
193 #endif /* PROJECT_CONF_H */
194 
195 #endif /* __CONTIKI_CONF_H__ */