Contiki 2.5
contiki-conf.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010, STMicroelectronics.
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  * This file is part of the Contiki OS
31  *
32  */
33 /*---------------------------------------------------------------------------*/
34 /**
35 * \file
36 * contiki-conf.h for MBXXX.
37 * \author
38 * Salvatore Pitrulli <salvopitru@users.sourceforge.net>
39 */
40 /*---------------------------------------------------------------------------*/
41 
42 
43 #ifndef __CONTIKI_CONF_H__
44 #define __CONTIKI_CONF_H__
45 
46 #include PLATFORM_HEADER
47 
48 #include <inttypes.h>
49 #include <string.h> // For memcpm().
50 
51 #define CC_CONF_REGISTER_ARGS 0
52 #define CC_CONF_FUNCTION_POINTER_ARGS 1
53 #define CC_CONF_FASTCALL
54 #define CC_CONF_VA_ARGS 1
55 #define CC_CONF_INLINE inline
56 
57 #define CCIF
58 #define CLIF
59 
60 typedef uint8_t u8_t;
61 typedef uint16_t u16_t;
62 typedef uint32_t u32_t;
63 typedef int32_t s32_t;
64 typedef unsigned short uip_stats_t;
65 
66 
67 //#define FIXED_NET_ADDRESS 1
68 //#define NET_ADDR_A 0x2001
69 //#define NET_ADDR_B 0xdb8
70 //#define NET_ADDR_C 0xbbbb
71 //#define NET_ADDR_D 0xabcd
72 
73 #define UART1_CONF_TX_WITH_INTERRUPT 0
74 #define WITH_SERIAL_LINE_INPUT 1
75 #define ENERGEST_CONF_ON 0
76 #define TELNETD_CONF_NUMLINES 6
77 
78 #define QUEUEBUF_CONF_NUM 2
79 
80 
81 #define NETSTACK_CONF_RADIO stm32w_radio_driver
82 
83 #if WITH_UIP6
84 
85 /* No radio cycling */
86 #define NETSTACK_CONF_NETWORK sicslowpan_driver
87 #define NETSTACK_CONF_MAC nullmac_driver
88 #define NETSTACK_CONF_RDC sicslowmac_driver
89 #define NETSTACK_CONF_FRAMER framer_802154
90 
91 #define RIMEADDR_CONF_SIZE 8
92 #define UIP_CONF_LL_802154 1
93 
94 #define UIP_CONF_ROUTER 1
95 #define UIP_CONF_IPV6_RPL 1
96 #define UIP_CONF_ND6_SEND_RA 0
97 //#define RPL_BORDER_ROUTER 0
98 
99 /* A trick to resolve a compilation error with IAR. */
100 #ifdef __ICCARM__
101 #define UIP_CONF_DS6_AADDR_NBU 1
102 #endif
103 
104 #define UIP_CONF_IPV6 1
105 #define UIP_CONF_IPV6_QUEUE_PKT 0 // This is a very costly feature as it increases the RAM usage by approximately UIP_ND6_MAX_NEIGHBORS * UIP_LINK_MTU bytes.
106 #define UIP_CONF_IPV6_CHECKS 1
107 #define UIP_CONF_IPV6_REASSEMBLY 0
108 #define UIP_CONF_ND6_MAX_PREFIXES 2
109 #define UIP_CONF_ND6_MAX_NEIGHBORS 2
110 #define UIP_CONF_ND6_MAX_DEFROUTERS 1
111 #define UIP_CONF_IP_FORWARD 0
112 #define UIP_CONF_BUFFER_SIZE 140
113 #define UIP_CONF_MAX_CONNECTIONS 6
114 #define UIP_CONF_MAX_LISTENPORTS 6
115 #define UIP_CONF_UDP_CONNS 3
116 
117 #define SICSLOWPAN_CONF_COMPRESSION_IPV6 0
118 #define SICSLOWPAN_CONF_COMPRESSION_HC1 1
119 #define SICSLOWPAN_CONF_COMPRESSION_HC06 2
120 #define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_CONF_COMPRESSION_HC06
121 #define SICSLOWPAN_CONF_FRAG 1
122 #define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 2
123 #define SICSLOWPAN_CONF_MAXAGE 2
124 
125 #define UIP_CONF_ICMP6 0
126 #endif /* WITH_UIP6 */
127 
128 #define UIP_CONF_UDP 1
129 #define UIP_CONF_TCP 1
130 
131 #define IEEE802154_CONF_PANID 0x1234
132 #define STM32W_NODE_ID 0x5678 // to be deleted
133 #define RF_CHANNEL 16
134 #define RADIO_RXBUFS 2 // Set to a number greater than 1 to decrease packet loss probability at high rates (e.g, with fragmented packets)
135 #define UIP_CONF_LLH_LEN 0
136 
137 typedef unsigned long clock_time_t;
138 
139 #define CLOCK_CONF_SECOND 1000
140 
141 typedef unsigned long long rtimer_clock_t;
142 #define RTIMER_CLOCK_LT(a,b) ((signed short)((a)-(b)) < 0)
143 
144 /* LEDs ports MB8xxx */
145 
146 #define LEDS_CONF_GREEN LED_D1
147 #define LEDS_CONF_YELLOW LED_D3
148 #define LEDS_CONF_RED LED_D3
149 
150 
151 #define UIP_ARCH_ADD32 1
152 #define UIP_ARCH_CHKSUM 0
153 
154 #define UIP_CONF_BYTE_ORDER UIP_LITTLE_ENDIAN
155 
156 
157 #ifdef PROJECT_CONF_H
158 #include PROJECT_CONF_H
159 #endif /* PROJECT_CONF_H */
160 
161 
162 #endif /* __CONTIKI_CONF_H__ */