Contiki 2.5
contiki-conf.h
1 /*
2  * Copyright (c) 2006, 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
11  * copyright notice, this list of conditions and the following
12  * disclaimer in the documentation and/or other materials provided
13  * with the distribution.
14  * 3. The name of the author may not be used to endorse or promote
15  * products derived from this software without specific prior
16  * written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
19  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
22  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
24  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  *
30  * $Id: contiki-conf.h,v 1.17 2010/03/31 10:22:33 fros4943 Exp $
31  *
32  */
33 
34 #ifndef __CONTIKI_CONF_H__
35 #define __CONTIKI_CONF_H__
36 
37 #define PROFILE_CONF_ON 0
38 #define ENERGEST_CONF_ON 0
39 #define LOG_CONF_ENABLED 1
40 
41 #define COOJA 1
42 
43 #if WITH_UIP
44 #if WITH_UIP6
45 #error WITH_UIP && WITH_IP6: Bad configuration
46 #endif /* WITH_UIP6 */
47 #endif /* WITH_UIP */
48 
49 #ifdef NETSTACK_CONF_H
50 
51 /* These header overrides the below default configuration */
52 #define NETSTACK__QUOTEME(s) NETSTACK_QUOTEME(s)
53 #define NETSTACK_QUOTEME(s) #s
54 #include NETSTACK__QUOTEME(NETSTACK_CONF_H)
55 
56 #else /* NETSTACK_CONF_H */
57 
58 /* Default network config */
59 #if WITH_UIP6
60 
61 /* Network setup for IPv6 */
62 #define NETSTACK_CONF_NETWORK uip_driver
63 #define NETSTACK_CONF_MAC nullmac_driver
64 #define NETSTACK_CONF_RDC nullrdc_driver
65 #define NETSTACK_CONF_RADIO cooja_radio_driver
66 #define UIP_CONF_IPV6 1
67 #define UIP_CONF_IP_FORWARD 0
68 
69 #else /* WITH_UIP6 */
70 
71 #if WITH_UIP
72 
73 /* Network setup for IPv4 */
74 #define NETSTACK_CONF_NETWORK rime_driver /* NOTE: uip_over_mesh. else: uip_driver */
75 #define NETSTACK_CONF_MAC nullmac_driver
76 #define NETSTACK_CONF_RDC nullrdc_driver
77 #define NETSTACK_CONF_RADIO cooja_radio_driver
78 #define UIP_CONF_IP_FORWARD 1
79 
80 #else /* WITH_UIP */
81 
82 /* Network setup for Rime */
83 #define NETSTACK_CONF_NETWORK rime_driver
84 #define NETSTACK_CONF_MAC nullmac_driver
85 #define NETSTACK_CONF_RDC nullrdc_driver
86 #define NETSTACK_CONF_RADIO cooja_radio_driver
87 /*#define NETSTACK_CONF_FRAMER framer_nullmac*/
88 
89 #endif /* WITH_UIP */
90 #endif /* WITH_UIP6 */
91 
92 #endif /* NETSTACK_CONF_H */
93 
94 
95 #define PACKETBUF_CONF_ATTRS_INLINE 1
96 
97 #define QUEUEBUF_CONF_NUM 16
98 
99 #define CC_CONF_REGISTER_ARGS 1
100 #define CC_CONF_FUNCTION_POINTER_ARGS 1
101 #define CC_CONF_FASTCALL
102 #define CC_CONF_VA_ARGS 1
103 #define CC_CONF_INLINE inline
104 
105 #define CCIF
106 #define CLIF
107 
108 #include <inttypes.h>
109 typedef uint8_t u8_t;
110 typedef uint16_t u16_t;
111 typedef uint32_t u32_t;
112 typedef int32_t s32_t;
113 typedef unsigned short uip_stats_t;
114 
115 #define CLOCK_CONF_SECOND 1000L
116 typedef unsigned long clock_time_t;
117 typedef unsigned long rtimer_clock_t;
118 #define RTIMER_CLOCK_LT(a,b) ((signed long)((a)-(b)) < 0)
119 
120 #define AODV_COMPLIANCE
121 #define AODV_NUM_RT_ENTRIES 32
122 
123 #define WITH_ASCII 1
124 
125 #define UIP_CONF_MAX_LISTENPORTS 40
126 #define UIP_CONF_MAX_CONNECTIONS 40
127 #define UIP_CONF_BYTE_ORDER UIP_LITTLE_ENDIAN
128 #define UIP_CONF_TCP_SPLIT 0
129 #define UIP_CONF_LOGGING 0
130 #define UIP_CONF_UDP_CHECKSUMS 0
131 #define UIP_CONF_BROADCAST 1
132 
133 #define UIP_CONF_UDP 1
134 #define UIP_CONF_TCP 1
135 
136 #if UIP_CONF_IPV6
137 #define RIMEADDR_CONF_SIZE 8
138 #define UIP_CONF_IPV6_QUEUE_PKT 1
139 #define UIP_CONF_IPV6_CHECKS 1
140 #define UIP_CONF_IPV6_REASSEMBLY 1
141 #define UIP_CONF_NETIF_MAX_ADDRESSES 3
142 #define UIP_CONF_ND6_MAX_PREFIXES 3
143 #define UIP_CONF_ND6_MAX_NEIGHBORS 4
144 #define UIP_CONF_ND6_MAX_DEFROUTERS 2
145 #endif /* UIP_CONF_IPV6 */
146 
147 #define CFS_CONF_OFFSET_TYPE long
148 
149 #endif /* __CONTIKI_CONF_H__ */