Contiki 3.x
contiki-conf.h
Go to the documentation of this file.
1 /**
2  * \addtogroup mbxxx-platform
3  *
4  * @{
5  */
6 /*
7  * Copyright (c) 2010, STMicroelectronics.
8  * All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
13  * 1. Redistributions of source code must retain the above copyright
14  * notice, this list of conditions and the following disclaimer.
15  * 2. Redistributions in binary form must reproduce the above
16  * copyright notice, this list of conditions and the following
17  * disclaimer in the documentation and/or other materials provided
18  * with the distribution.
19  * 3. The name of the author may not be used to endorse or promote
20  * products derived from this software without specific prior
21  * written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
24  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
27  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
29  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
31  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34  *
35  * This file is part of the Contiki OS
36  *
37  */
38 /*---------------------------------------------------------------------------*/
39 /**
40 * \file
41 * Contiki-conf.h for MBXXX.
42 * \author
43 * Salvatore Pitrulli <salvopitru@users.sourceforge.net>
44 * Chi-Anh La <la@imag.fr>
45 * Simon Duquennoy <simonduq@sics.se>
46 */
47 /*---------------------------------------------------------------------------*/
48 
49 
50 
51 #ifndef CONTIKI_CONF_H_
52 #define CONTIKI_CONF_H_
53 
54 #ifdef PLATFORM_CONF_H
55 #include PLATFORM_CONF_H
56 #else
57 #include "platform-conf.h"
58 #endif /* PLATFORM_CONF_H */
59 
60 /* Radio and 802.15.4 params */
61 /* 802.15.4 radio channel */
62 #define RF_CHANNEL 16
63 /* 802.15.4 PAN ID */
64 #define IEEE802154_CONF_PANID 0x1234
65 /* Use EID 64, enable hardware autoack and address filtering */
66 #define LINKADDR_CONF_SIZE 8
67 #define UIP_CONF_LL_802154 1
68 #define ST_CONF_RADIO_AUTOACK 1
69 /* Number of buffers for incoming frames */
70 #define RADIO_RXBUFS 2
71 /* Set to 0 for non ethernet links */
72 #define UIP_CONF_LLH_LEN 0
73 
74 /* RDC params */
75 /* TX routine passes the cca/ack result in the return parameter */
76 #define RDC_CONF_HARDWARE_ACK 1
77 /* TX routine does automatic cca and optional backoff */
78 #define RDC_CONF_HARDWARE_CSMA 0
79 /* RDC debug with LED */
80 #define RDC_CONF_DEBUG_LED 1
81 /* Channel check rate (per second) */
82 #define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE 8
83 /* Use ACK for optimization (LPP, XMAC) */
84 #define WITH_ACK_OPTIMIZATION 0
85 
86 /* Netstack config */
87 //#define NETSTACK_CONF_MAC csma_driver
88 //#define NETSTACK_CONF_RDC contikimac_driver
89 #define NETSTACK_CONF_MAC nullmac_driver
90 #define NETSTACK_CONF_RDC nullrdc_driver
91 #define NETSTACK_CONF_FRAMER framer_802154
92 #define NETSTACK_CONF_RADIO stm32w_radio_driver
93 
94 /* ContikiMAC config */
95 #define CONTIKIMAC_CONF_COMPOWER 1
96 #define CONTIKIMAC_CONF_BROADCAST_RATE_LIMIT 0
97 #define CONTIKIMAC_CONF_ANNOUNCEMENTS 0
98 
99 /* CXMAC config */
100 #define CXMAC_CONF_ANNOUNCEMENTS 0
101 #define CXMAC_CONF_COMPOWER 1
102 
103 /* XMAC config */
104 #define XMAC_CONF_ANNOUNCEMENTS 0
105 #define XMAC_CONF_COMPOWER 1
106 
107 /* Other (RAM saving) */
108 #define ENERGEST_CONF_ON 0
109 #define QUEUEBUF_CONF_NUM 2
110 #define QUEUEBUF_CONF_REF_NUM 0
111 #define NBR_TABLE_CONF_MAX_NEIGHBORS 4
112 #define UIP_CONF_DS6_ROUTE_NBU 4
113 #define RPL_CONF_MAX_PARENTS_PER_DAG 4
114 #define RPL_CONF_MAX_INSTANCES 1
115 #define RPL_CONF_MAX_DAG_PER_INSTANCE 1
116 #define PROCESS_CONF_NUMEVENTS 16
117 
118 #if WITH_UIP6
119 
120 /* Network setup for IPv6 */
121 #define NETSTACK_CONF_NETWORK sicslowpan_driver
122 
123 /* Specify a minimum packet size for 6lowpan compression to be
124  enabled. This is needed for ContikiMAC, which needs packets to be
125  larger than a specified size, if no ContikiMAC header should be
126  used. */
127 #define SICSLOWPAN_CONF_COMPRESSION_THRESHOLD 63
128 
129 #define UIP_CONF_UDP 1
130 
131 #if (WITH_COAP==7) || (WITH_COAP==6) || (WITH_COAP==3)
132 #define UIP_CONF_TCP 0
133 #else
134 #define UIP_CONF_TCP 1
135 #endif /* WITH_COAP */
136 
137 #define UIP_CONF_ROUTER 1
138 #define UIP_CONF_IPV6_RPL 1
139 #define UIP_CONF_ND6_SEND_RA 0
140 
141 #define UIP_CONF_IPV6 1
142 #define UIP_CONF_IPV6_QUEUE_PKT 0
143 #define UIP_CONF_IPV6_CHECKS 1
144 #define UIP_CONF_IPV6_REASSEMBLY 0
145 #define UIP_CONF_ND6_MAX_PREFIXES 2
146 #define UIP_CONF_ND6_MAX_DEFROUTERS 1
147 #define UIP_CONF_IP_FORWARD 0
148 #define UIP_CONF_BUFFER_SIZE 140
149 #define UIP_CONF_MAX_CONNECTIONS 4
150 #define UIP_CONF_MAX_LISTENPORTS 8
151 #define UIP_CONF_UDP_CONNS 4
152 
153 #define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_COMPRESSION_HC06
154 #ifndef SICSLOWPAN_CONF_FRAG
155 #define SICSLOWPAN_CONF_FRAG 1
156 #endif /* SICSLOWPAN_CONF_FRAG */
157 #ifndef SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS
158 #define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 2
159 #endif /* SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS */
160 #ifndef SICSLOWPAN_CONF_MAXAGE
161 #define SICSLOWPAN_CONF_MAXAGE 2
162 #endif /* SICSLOWPAN_CONF_MAXAGE */
163 
164 #else /* WITH_UIP6 */
165 
166 /* Network setup for non-IPv6 (rime). */
167 #define NETSTACK_CONF_NETWORK rime_driver
168 
169 #endif /* WITH_UIP6 */
170 
171 #ifdef PROJECT_CONF_H
172 #include PROJECT_CONF_H
173 #endif /* PROJECT_CONF_H */
174 
175 #endif /* CONTIKI_CONF_H_ */
176 /** @} */
Platform-conf.h for MBXXX.