Reduce RIME max time to fit in 16 bit timer
[contiki-2.x.git] / platform / avr-raven / contiki-conf.h
blobd2ffcb023f3f59e5a66a4cff7c6bdc5c6221659a
1 /*
2 * Copyright (c) 2006, Technical University of Munich
3 * All rights reserved.
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 * 3. Neither the name of the Institute nor the names of its contributors
14 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission.
17 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
29 * This file is part of the Contiki operating system.
31 * @(#)$$
34 /**
35 * \file
36 * Configuration for Atmel Raven
38 * \author
39 * Simon Barner <barner@in.tum.de>
40 * David Kopf <dak664@embarqmail.com>
43 #ifndef __CONTIKI_CONF_H__
44 #define __CONTIKI_CONF_H__
46 /* MCU and clock rate */
47 #define MCU_MHZ 8
48 #define PLATFORM PLATFORM_AVR
49 #define RAVEN_REVISION RAVEN_D
51 /* Clock ticks per second */
52 #define CLOCK_CONF_SECOND 125
54 /* Since clock_time_t is 16 bits, maximum interval is 524 seconds */
55 #define RIME_CONF_BROADCAST_ANNOUNCEMENT_MAX_TIME CLOCK_CONF_SECOND * 524UL /*Default uses 600*/
57 /* Maximum time interval (used for timers) */
58 #define INFINITE_TIME 0xffff
60 /* COM port to be used for SLIP connection */
61 #define SLIP_PORT RS232_PORT_0
63 /* Pre-allocated memory for loadable modules heap space (in bytes)*/
64 #define MMEM_CONF_SIZE 256
66 /* Use the following address for code received via the codeprop
67 * facility
69 #define EEPROMFS_ADDR_CODEPROP 0x8000
71 #define CCIF
72 #define CLIF
74 #define RIMEADDR_CONF_SIZE 8
76 #define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_COMPRESSION_HC06
78 /* RF230BB must be used with low power protocols */
79 #if RF230BB
80 #define SICSLOWPAN_CONF_CONVENTIONAL_MAC 1 //for barebones driver, sicslowpan calls radio->read function
81 #undef PACKETBUF_CONF_HDR_SIZE //RF230BB takes the packetbuf default for header size
82 #else
83 #define PACKETBUF_CONF_HDR_SIZE 0 //RF230 handles headers internally
84 #endif /*RF230BB */
86 #define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 2
88 #if 1 /* Network setup */
90 /* No radio cycling */
91 #define NETSTACK_CONF_NETWORK sicslowpan_driver
92 #define NETSTACK_CONF_MAC nullmac_driver
93 #define NETSTACK_CONF_RDC sicslowmac_driver
94 #define NETSTACK_CONF_FRAMER framer_802154
95 #define NETSTACK_CONF_RADIO rf230_driver
96 #define RF230_CONF_AUTOACK 1
97 #define RF230_CONF_AUTORETRIES 2
98 #define SICSLOWPAN_CONF_FRAG 1
99 //Most browsers reissue GETs after 3 seconds which stops frag reassembly, longer MAXAGE does no good
100 #define SICSLOWPAN_CONF_MAXAGE 3
101 #define QUEUEBUF_CONF_NUM 1
102 #define QUEUEBUF_CONF_REF_NUM 1
104 #elif 0
105 /* Contiki-mac radio cycling */
106 #define NETSTACK_CONF_NETWORK sicslowpan_driver
107 #define NETSTACK_CONF_MAC nullmac_driver
108 #define NETSTACK_CONF_RDC contikimac_driver
109 #define NETSTACK_CONF_FRAMER framer_802154
110 #define NETSTACK_CONF_RADIO rf230_driver
111 #define RF230_CONF_AUTOACK 0
112 #define RF230_CONF_AUTORETRIES 0
114 #elif 0
115 /* cx-mac radio cycling */
116 #define NETSTACK_CONF_NETWORK sicslowpan_driver
117 #define NETSTACK_CONF_MAC nullmac_driver
118 #define NETSTACK_CONF_RDC cxmac_driver
119 #define NETSTACK_CONF_FRAMER framer_802154
120 #define NETSTACK_CONF_RADIO rf230_driver
121 #define RF230_CONF_AUTOACK 0
122 #define RF230_CONF_AUTORETRIES 0
123 #define MAC_CONF_CHANNEL_CHECK_RATE 8
124 #define SICSLOWPAN_CONF_FRAG 1
125 #define SICSLOWPAN_CONF_MAXAGE 3
126 #define QUEUEBUF_CONF_NUM 4
127 #define QUEUEBUF_CONF_REF_NUM 2
128 //Below will prevent fragmentation of TCP packets, undef for faster page loads, simpler wireshark captures
129 //#define UIP_CONF_TCP_MSS 48
130 //Below gives 10% duty cycle, undef for default 5%
131 //#define CXMAC_CONF_ON_TIME (RTIMER_ARCH_SECOND / 80)
132 //Below gives 50% duty cycle
133 //#define CXMAC_CONF_ON_TIME (RTIMER_ARCH_SECOND / 16)
135 #else
136 #error Network configuration not specified!
137 #endif /* Network setup */
139 /* Logging adds 200 bytes to program size */
140 #define LOG_CONF_ENABLED 1
142 #define UIP_CONF_LL_802154 1
143 #define UIP_CONF_LLH_LEN 0
145 #define UIP_CONF_MAX_CONNECTIONS 2
146 #define UIP_CONF_MAX_LISTENPORTS 2
147 #define UIP_CONF_UDP_CONNS 2
149 #define UIP_CONF_IP_FORWARD 0
150 #define UIP_CONF_FWCACHE_SIZE 0
152 #define UIP_CONF_IPV6 1
153 #define UIP_CONF_IPV6_CHECKS 1
154 #define UIP_CONF_IPV6_QUEUE_PKT 1
155 #define UIP_CONF_IPV6_REASSEMBLY 0
156 #define UIP_CONF_NETIF_MAX_ADDRESSES 3
157 #define UIP_CONF_ND6_MAX_PREFIXES 3
158 #define UIP_CONF_ND6_MAX_NEIGHBORS 4
159 #define UIP_CONF_ND6_MAX_DEFROUTERS 2
160 #define UIP_CONF_ICMP6 1
162 #define UIP_CONF_UDP 1
163 #define UIP_CONF_UDP_CHECKSUMS 1
165 #define UIP_CONF_TCP 1
166 #define UIP_CONF_TCP_SPLIT 1
169 #include <stdint.h>
171 typedef int32_t s32_t;
172 typedef unsigned short clock_time_t;
173 typedef unsigned char u8_t;
174 typedef unsigned short u16_t;
175 typedef unsigned long u32_t;
176 typedef unsigned short uip_stats_t;
177 typedef unsigned long off_t;
179 void clock_delay(unsigned int us2);
180 void clock_wait(int ms10);
181 void clock_set_seconds(unsigned long s);
182 unsigned long clock_seconds(void);
184 #endif /* __CONTIKI_CONF_H__ */