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