Contiki-NG
Toggle main menu visibility
Loading...
Searching...
No Matches
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
*
31
*/
32
33
#ifndef CONTIKI_CONF_H_
34
#define CONTIKI_CONF_H_
35
36
/* include the project config */
37
#ifdef PROJECT_CONF_PATH
38
#include PROJECT_CONF_PATH
39
#endif
/* PROJECT_CONF_PATH */
40
41
#ifdef INCLUDE_SUBPLATFORM_CONF
42
#include "subplatform-conf.h"
43
#endif
/* INCLUDE_SUBPLATFORM_CONF */
44
45
#define PLATFORM_CONF_PROVIDES_MAIN_LOOP 1
46
47
#define LOG_CONF_ENABLED 1
48
49
#define COOJA 1
50
51
#define ASSERT_CONF_RETURNS 1
52
53
#ifndef EEPROM_CONF_SIZE
54
#define EEPROM_CONF_SIZE 1024
55
#endif
56
57
#ifdef NETSTACK_CONF_H
58
59
/* These header overrides the below default configuration */
60
#define NETSTACK__QUOTEME(s) NETSTACK_QUOTEME(s)
61
#define NETSTACK_QUOTEME(s) #s
62
#include NETSTACK__QUOTEME(NETSTACK_CONF_H)
63
64
#else
/* NETSTACK_CONF_H */
65
66
/* Default network config */
67
#define CSMA_CONF_SEND_SOFT_ACK 1
68
#define CSMA_CONF_ACK_WAIT_TIME RTIMER_SECOND / 500
69
#define CSMA_CONF_AFTER_ACK_DETECTED_WAIT_TIME 0
70
71
#endif
/* NETSTACK_CONF_H */
72
73
/* Radio setup */
74
#define NETSTACK_CONF_RADIO cooja_radio_driver
75
76
/* Default network config */
77
#if NETSTACK_CONF_WITH_IPV6
78
79
80
/* configure network size and density */
81
#ifndef NETSTACK_MAX_ROUTE_ENTRIES
82
#define NETSTACK_MAX_ROUTE_ENTRIES 300
83
#endif
/* NETSTACK_MAX_ROUTE_ENTRIES */
84
#ifndef NBR_TABLE_CONF_MAX_NEIGHBORS
85
#define NBR_TABLE_CONF_MAX_NEIGHBORS 300
86
#endif
/* NBR_TABLE_CONF_MAX_NEIGHBORS */
87
88
/* configure queues */
89
#ifndef QUEUEBUF_CONF_NUM
90
#define QUEUEBUF_CONF_NUM 64
91
#endif
/* QUEUEBUF_CONF_NUM */
92
93
#ifndef UIP_CONF_IPV6_QUEUE_PKT
94
#define UIP_CONF_IPV6_QUEUE_PKT 1
95
#endif
/* UIP_CONF_IPV6_QUEUE_PKT */
96
97
#endif
/* NETSTACK_CONF_WITH_IPV6 */
98
99
#define CC_CONF_VA_ARGS 1
100
101
#include <inttypes.h>
102
103
typedef
unsigned
short
uip_stats_t;
104
105
#define CLOCK_CONF_SECOND 1000L
106
107
/* Use 64-bit rtimer (default in Contiki-NG is 32) */
108
#define RTIMER_CONF_CLOCK_SIZE 8
109
110
/* 1 len byte, 2 bytes CRC */
111
#define RADIO_PHY_OVERHEAD 3
112
/* 250kbps data rate. One byte = 32us */
113
#define RADIO_BYTE_AIR_TIME 32
114
#define RADIO_DELAY_BEFORE_TX 0
115
#define RADIO_DELAY_BEFORE_RX 0
116
#define RADIO_DELAY_BEFORE_DETECT 0
117
118
#define UIP_ARCH_IPCHKSUM 1
119
120
#define CFS_CONF_OFFSET_TYPE long
121
122
#define PLATFORM_CONF_SUPPORTS_STACK_CHECK 0
123
124
/* Override CSPRNG_CONF_ENABLED to ensure that simRandomSeed takes effect */
125
#undef CSPRNG_CONF_ENABLED
126
#define CSPRNG_CONF_ENABLED 1
127
128
/*---------------------------------------------------------------------------*/
129
/* Support for the new GPIO HAL */
130
#define GPIO_HAL_CONF_ARCH_HDR_PATH "dev/gpio-hal-arch.h"
131
#define GPIO_HAL_CONF_ARCH_SW_TOGGLE 1
132
#define GPIO_HAL_CONF_PORT_PIN_NUMBERING 0
133
#define GPIO_HAL_CONF_PIN_COUNT 4
134
135
/* Virtual LED pins 0, 1, 2 (Green, Red, Yellow) */
136
#define COOJA_LED_GREEN_PIN 0
137
#define COOJA_LED_RED_PIN 1
138
#define COOJA_LED_YELLOW_PIN 2
139
140
/* Virtual button on pin 3 */
141
#define COOJA_BTN_PIN 3
142
143
#define BUTTON_HAL_CONF_DEBOUNCE_DURATION 0
144
145
/* Notify various examples that we have Buttons and LEDs */
146
#define PLATFORM_HAS_BUTTON 1
147
#define PLATFORM_SUPPORTS_BUTTON_HAL 1
148
#define PLATFORM_HAS_LEDS 1
149
/*---------------------------------------------------------------------------*/
150
/* Virtual LED colors */
151
#define LEDS_CONF_COUNT 3
152
#define LEDS_CONF_GREEN 1
153
#define LEDS_CONF_RED 2
154
#define LEDS_CONF_YELLOW 4
155
/*---------------------------------------------------------------------------*/
156
#endif
/* CONTIKI_CONF_H_ */
arch
platform
cooja
contiki-conf.h
Generated on
for Contiki-NG by
1.17.0