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 NETSTACK_CONF_WITH_IPV6
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 /* NETSTACK_CONF_WITH_IPV6 */
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 /* NETSTACK_CONF_WITH_IPV6 */
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 NETSTACK_CONF_WITH_IPV6
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 #define NBR_TABLE_CONF_MAX_NEIGHBORS 30
134 #define UIP_CONF_MAX_ROUTES 30
135 
136 #define UIP_CONF_ND6_SEND_RA 0
137 #define UIP_CONF_ND6_REACHABLE_TIME 600000
138 #define UIP_CONF_ND6_RETRANS_TIMER 10000
139 
140 #define NETSTACK_CONF_WITH_IPV6 1
141 #define UIP_CONF_IPV6_QUEUE_PKT 0
142 #define UIP_CONF_IPV6_CHECKS 1
143 #define UIP_CONF_IPV6_REASSEMBLY 0
144 #define UIP_CONF_NETIF_MAX_ADDRESSES 3
145 #define UIP_CONF_IP_FORWARD 0
146 #define UIP_CONF_BUFFER_SIZE 1300
147 #define SICSLOWPAN_CONF_FRAG 1
148 #define SICSLOWPAN_CONF_MAXAGE 8
149 
150 #define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_COMPRESSION_HC06
151 #ifndef SICSLOWPAN_CONF_FRAG
152 #define SICSLOWPAN_CONF_FRAG 1
153 #define SICSLOWPAN_CONF_MAXAGE 8
154 #endif /* SICSLOWPAN_CONF_FRAG */
155 #define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 2
156 #else /* NETSTACK_CONF_WITH_IPV6 */
157 #define UIP_CONF_IP_FORWARD 1
158 #define UIP_CONF_BUFFER_SIZE 1300
159 #endif /* NETSTACK_CONF_WITH_IPV6 */
160 
161 #define UIP_CONF_ICMP_DEST_UNREACH 1
162 
163 #define UIP_CONF_DHCP_LIGHT
164 #define UIP_CONF_LLH_LEN 0
165 #define UIP_CONF_RECEIVE_WINDOW 48
166 #define UIP_CONF_TCP_MSS 48
167 #define UIP_CONF_MAX_CONNECTIONS 4
168 #define UIP_CONF_MAX_LISTENPORTS 8
169 #define UIP_CONF_UDP_CONNS 12
170 #define UIP_CONF_FWCACHE_SIZE 30
171 #define UIP_CONF_BROADCAST 1
172 #define UIP_CONF_UDP 1
173 #define UIP_CONF_UDP_CHECKSUMS 1
174 #define UIP_CONF_PINGADDRCONF 0
175 #define UIP_CONF_LOGGING 0
176 
177 #define UIP_CONF_TCP_SPLIT 0
178 
179 /* include the project config */
180 /* PROJECT_CONF_H might be defined in the project Makefile */
181 #ifdef PROJECT_CONF_H
182 #include PROJECT_CONF_H
183 #endif /* PROJECT_CONF_H */
184 
185 #endif /* __CONTIKI_CONF_H__ */