Contiki 3.x
contiki-conf.h
1 #ifndef CONTIKI_CONF_H_
2 #define CONTIKI_CONF_H_
3 
4 #ifdef __CYGWIN__
5 #include <sys/types.h>
6 #endif
7 
8 #define CC_CONF_REGISTER_ARGS 1
9 #define CC_CONF_INLINE __inline
10 
11 #define ARCH_DOESNT_NEED_ALIGNED_STRUCTS 1
12 
13 
14 #if _USRDLL
15 #define CCIF __declspec(dllimport)
16 #else /* _USRDLL */
17 #define CCIF __declspec(dllexport)
18 #endif /* _USRDLL */
19 #define CLIF __declspec(dllexport)
20 
21 #ifdef __CYGWIN__
22 int strcasecmp(const char*, const char*);
23 int strncasecmp(const char*, const char*, size_t);
24 char* strdup(const char*);
25 #else /* __CYGWIN__ */
26 #define HAVE_SNPRINTF
27 #define snprintf _snprintf
28 #define strcasecmp _stricmp
29 #define strncasecmp _strnicmp
30 #define strdup _strdup
31 #endif /* __CYGWIN__ */
32 
33 
34 #define LOG_CONF_ENABLED 1
35 #include "sys/log.h"
36 CCIF void debug_printf(char *format, ...);
37 
38 
39 #define CLOCK_CONF_SECOND 1000
40 typedef unsigned long clock_time_t;
41 
42 
43 typedef signed char int8_t;
44 typedef unsigned char uint8_t;
45 typedef signed short int16_t;
46 typedef unsigned short uint16_t;
47 typedef signed int int32_t;
48 typedef unsigned int uint32_t;
49 
50 /* These names are deprecated, use C99 names. */
51 typedef unsigned char u8_t;
52 typedef unsigned short u16_t;
53 typedef unsigned long u32_t;
54 typedef long s32_t;
55 
56 typedef unsigned short uip_stats_t;
57 
58 #define UIP_CONF_LLH_LEN 14
59 #define UIP_CONF_BUFFER_SIZE 1514
60 #define UIP_CONF_TCP_SPLIT 1
61 #define UIP_CONF_LOGGING 1
62 #define UIP_CONF_UDP_CHECKSUMS 1
63 #define UIP_CONF_IP_FORWARD 0
64 #if NETSTACK_CONF_WITH_IPV6
65 #define NBR_TABLE_CONF_MAX_NEIGHBORS 100
66 #define UIP_CONF_DS6_DEFRT_NBU 2
67 #define UIP_CONF_DS6_PREFIX_NBU 5
68 #define UIP_CONF_MAX_ROUTES 100
69 #define UIP_CONF_DS6_ADDR_NBU 10
70 #define UIP_CONF_DS6_MADDR_NBU 0 //VC++ does not allow zero length arrays
71 #define UIP_CONF_DS6_AADDR_NBU 0 //inside a struct
72 #endif
73 
74 #define RESOLV_CONF_SUPPORTS_MDNS 0
75 #define RESOLV_CONF_SUPPORTS_RECORD_EXPIRATION 0
76 
77 #include <ctype.h>
78 #define ctk_arch_isprint isprint
79 
80 #include "ctk/ctk-console.h"
81 
82 #define CH_ULCORNER '+'
83 #define CH_URCORNER '+'
84 #define CH_LLCORNER '+'
85 #define CH_LRCORNER '+'
86 #define CH_ENTER '\r'
87 #define CH_DEL '\b'
88 #define CH_CURS_UP -1
89 #define CH_CURS_LEFT -2
90 #define CH_CURS_RIGHT -3
91 #define CH_CURS_DOWN -4
92 
93 #define CTK_CONF_MENU_KEY -5 /* F10 */
94 #define CTK_CONF_WINDOWSWITCH_KEY -6 /* Ctrl-Tab */
95 #define CTK_CONF_WIDGETUP_KEY -7 /* Shift-Tab */
96 #define CTK_CONF_WIDGETDOWN_KEY '\t'
97 #define CTK_CONF_WIDGET_FLAGS 0
98 #define CTK_CONF_SCREENSAVER 0
99 
100 #ifdef PLATFORM_BUILD
101 #define CTK_CONF_MOUSE_SUPPORT 1
102 #define CTK_CONF_WINDOWS 1
103 #define CTK_CONF_WINDOWMOVE 1
104 #define CTK_CONF_WINDOWCLOSE 1
105 #define CTK_CONF_ICONS 1
106 #define CTK_CONF_ICON_BITMAPS 0
107 #define CTK_CONF_ICON_TEXTMAPS 1
108 #define CTK_CONF_MENUS 1
109 #define CTK_CONF_MENUWIDTH 16
110 #define CTK_CONF_MAXMENUITEMS 10
111 #else /* PLATFORM_BUILD */
112 #define CTK_CONF_MOUSE_SUPPORT 1
113 #define CTK_CONF_WINDOWS 0
114 #define CTK_CONF_WINDOWMOVE 0
115 #define CTK_CONF_WINDOWCLOSE 0
116 #define CTK_CONF_ICONS 0
117 #define CTK_CONF_MENUS 0
118 #endif /* PLATFORM_BUILD */
119 
120 #define CTK_COLOR_BLACK (0)
121 #define CTK_COLOR_BLUE (1)
122 #define CTK_COLOR_GRAY (1 | 2 | 4)
123 #define CTK_COLOR_CYAN (1 | 2 | 8)
124 #define CTK_COLOR_YELLOW (2 | 4 | 8)
125 #define CTK_COLOR_WHITE (1 | 2 | 4 | 8)
126 
127 #define COLOR_BG CTK_COLOR_BLUE
128 
129 #define BORDERCOLOR CTK_COLOR_BLACK
130 #define SCREENCOLOR CTK_COLOR_BLACK
131 #define BACKGROUNDCOLOR CTK_COLOR_BLACK
132 #define WINDOWCOLOR_FOCUS CTK_COLOR_WHITE | COLOR_BG * 0x10
133 #define WINDOWCOLOR CTK_COLOR_GRAY | COLOR_BG * 0x10
134 #define DIALOGCOLOR CTK_COLOR_WHITE | COLOR_BG * 0x10
135 #define WIDGETCOLOR_HLINK CTK_COLOR_CYAN | COLOR_BG * 0x10
136 #define WIDGETCOLOR_FWIN CTK_COLOR_WHITE | COLOR_BG * 0x10
137 #define WIDGETCOLOR CTK_COLOR_GRAY | COLOR_BG * 0x10
138 #define WIDGETCOLOR_DIALOG CTK_COLOR_WHITE | COLOR_BG * 0x10
139 #define WIDGETCOLOR_FOCUS CTK_COLOR_YELLOW | COLOR_BG * 0x10
140 #define MENUCOLOR CTK_COLOR_WHITE | COLOR_BG * 0x10
141 #define OPENMENUCOLOR CTK_COLOR_WHITE | COLOR_BG * 0x10
142 #define ACTIVEMENUITEMCOLOR CTK_COLOR_YELLOW | COLOR_BG * 0x10
143 
144 
145 #ifdef PLATFORM_BUILD
146 #define LOADER_CONF_ARCH "loader/dll-loader.h"
147 #else /* PLATFORM_BUILD */
148 #define LOADER_CONF_ARCH "loader/unload.h"
149 #endif /* PLATFORM_BUILD */
150 
151 #define PROGRAM_HANDLER_CONF_MAX_NUMDSCS 10
152 #define PROGRAM_HANDLER_CONF_QUIT_MENU 1
153 
154 
155 #define EMAIL_CONF_WIDTH 76
156 #define EMAIL_CONF_HEIGHT 30
157 #ifndef PLATFORM_BUILD
158 #define EMAIL_CONF_ERASE 0
159 #endif
160 
161 #define IRC_CONF_WIDTH 78
162 #define IRC_CONF_HEIGHT 30
163 #define IRC_CONF_SYSTEM_STRING "Win32"
164 
165 
166 #define SHELL_CONF_WITH_PROGRAM_HANDLER 1
167 
168 
169 #define SHELL_GUI_CONF_XSIZE 78
170 #define SHELL_GUI_CONF_YSIZE 30
171 
172 
173 #define TELNETD_CONF_MAX_IDLE_TIME 300
174 #ifdef PLATFORM_BUILD
175 #define TELNETD_CONF_GUI 1
176 #endif /* PLATFORM_BUILD */
177 
178 
179 #ifdef PLATFORM_BUILD
180 #define WWW_CONF_WEBPAGE_WIDTH 76
181 #define WWW_CONF_WEBPAGE_HEIGHT 30
182 #else /* PLATFORM_BUILD */
183 #define WWW_CONF_WGET_EXEC(url) execlp("wget.win32", "wget.win32", \
184  "192.168.0.2", url, (char *)NULL)
185 #endif /* PLATFORM_BUILD */
186 
187 #endif /* CONTIKI_CONF_H_ */