Contiki 2.5
contiki-conf.h
1 /*
2  * Copyright (c) 2007, Takahide Matsutsuka.
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  * $Id: contiki-conf.h,v 1.6 2008/02/15 16:51:06 oliverschmidt Exp $
31  *
32  */
33 
34 /*
35  * \file
36  * contiki-conf.h
37  * A set of configurations of contiki for PC-6001 family.
38  * \author
39  * Takahide Matsutsuka <markn@markn.org>
40  */
41 
42 #ifndef __CONTIKI_CONF_H__
43 #define __CONTIKI_CONF_H__
44 
45 #include "z80def.h"
46 #include "sys/cc.h"
47 #include <ctype.h>
48 #include <string.h>
49 #include "ctk/ctk_arch.h"
50 #include "strcasecmp.h"
51 #include "log.h"
52 
53 /* Time type. */
54 typedef unsigned long clock_time_t;
55 
56 /* Defines tick counts for a second. */
57 #define CLOCK_CONF_SECOND 1024
58 
59 #define rtimer_arch_now() clock_time()
60 
61 /* Memory filesystem RAM size. */
62 #define CFS_RAM_CONF_SIZE 512
63 
64 /* Logging.. */
65 #define LOG_CONF_ENABLED 0
66 
67 #undef MALLOC_TEST
68 
69 /*---------------------------------------------------------------------------*/
70 /* screen properties */
71 #define LIBCONIO_CONF_ATTRIBUTES_ENABLED
72 #if defined(ARCH_PC6001MK2)
73 #define LIBCONIO_VRAM_ATTR 0x4000
74 #define LIBCONIO_VRAM_CHAR 0x4400
75 #define LIBCONIO_CONF_SCREEN_WIDTH 40
76 #define LIBCONIO_CONF_SCREEN_HEIGHT 20
77 #define LIBCONIO_COLOR_NORMAL 0x0f
78 #define LIBCONIO_COLOR_REVERSED 0x70
79 #elif (defined(ARCH_PC6001) || defined(ARCH_PC6001A)) && defined(MEMORY_16K)
80 #define LIBCONIO_VRAM_ATTR 0xc000
81 #define LIBCONIO_VRAM_CHAR 0xc200
82 #define LIBCONIO_CONF_SCREEN_WIDTH 32
83 #define LIBCONIO_CONF_SCREEN_HEIGHT 16
84 #define LIBCONIO_COLOR_NORMAL 0x20
85 #define LIBCONIO_COLOR_REVERSED 0x21
86 #elif (defined(ARCH_PC6001) || defined(ARCH_PC6001A)) && (defined(MEMORY_32K) || defined(MEMORY_ROM))
87 #define LIBCONIO_VRAM_ATTR 0x8000
88 #define LIBCONIO_VRAM_CHAR 0x8200
89 #define LIBCONIO_CONF_SCREEN_WIDTH 32
90 #define LIBCONIO_CONF_SCREEN_HEIGHT 16
91 #define LIBCONIO_COLOR_NORMAL 0x20
92 #define LIBCONIO_COLOR_REVERSED 0x21
93 #else
94 #error Specify appropriate ARCH & MEMORY combination
95 #endif /* ARCH_PC6001MK2 */
96 
97 #if 0 /* ctk-conio case */
98 #define SCREENCOLOR 0x20
99 #define BORDERCOLOR 0x20
100 #define WIDGETCOLOR 0x20
101 #define WIDGETCOLOR_FWIN 0x20
102 #define BACKGROUNDCOLOR 0x20
103 #define DIALOGCOLOR 0x20
104 #define WINDOWCOLOR 0x20
105 #define WINDOWCOLOR_FOCUS 0x21
106 #define MENUCOLOR 0x21
107 #define MENUCOLOR 0x21
108 #define OPENMENUCOLOR 0x22
109 #define ACTIVEMENUITEMCOLOR 0x23
110 #define WIDGETCOLOR_HLINK 0x21
111 #define WIDGETCOLOR_FOCUS 0x20
112 #define WIDGETCOLOR_DIALOG 0x22
113 #endif
114 
115 /* uIP configuration */
116 #define UIP_CONF_MAX_CONNECTIONS 4
117 #define UIP_CONF_MAX_LISTENPORTS 4
118 #define UIP_CONF_BUFFER_SIZE 400
119 #define UIP_CONF_BYTE_ORDER LITTLE_ENDIAN
120 #define UIP_CONF_TCP_SPLIT 0
121 #define UIP_CONF_LOGGING 0
122 
123 /* uses SLIP */
124 #define UIP_CONF_UDP 0
125 #define UIP_CONF_UDP_CHECKSUMS 0
126 #define UIP_CONF_LLH_LEN 0
127 #undef UIP_CONF_BROADCAST
128 #undef RS232_CONF_CALLBACK
129 /* #define RS232_CONF_CALLBACK serial_input_byte */
130 #define slip_arch_init(ubr) rs232_arch_init(ubr)
131 #define slip_arch_writeb(c) rs232_arch_writeb(c)
132 
133 #ifdef WITH_LOADER_ARCH
134 //#define AUTOSTART_ENABLE 1
135 #define LOADER_CONF_ARCH "loader_arch.h"
136 #endif /* WITH_LOADER_ARCH */
137 
138 /*---------------------------------------------------------------------------*/
139 /* Application specific configurations. */
140 
141 /* Command shell */
142 #define SHELL_GUI_CONF_XSIZE 26
143 #define SHELL_GUI_CONF_YSIZE 10
144 
145 /* Text editor */
146 #define EDITOR_CONF_WIDTH 26
147 #define EDITOR_CONF_HEIGHT 8
148 
149 /* Process list */
150 #define PROCESSLIST_CONF_HEIGHT 12
151 
152 /* File dialog */
153 #define FILES_CONF_HEIGHT 6
154 
155 /* Shell */
156 //#define SHELL_CONF_WITH_PROGRAM_HANDLER 1
157 
158 /* Telnet */
159 #define TELNET_CONF_WINDOW_WIDTH 30
160 #define TELNET_CONF_WINDOW_HEIGHT 13
161 //#define TELNET_CONF_TEXTAREA_HEIGHT 5 // TELNET_WINDOW_HEIGHT - 8
162 //#define TELNET_CONF_ENTRY_WIDTH 22 // TELNET_WINDOW_WIDTH - 8
163 
164 /* Telnetd */
165 #define TELNETD_CONF_GUI 0
166 #define SHELL_CONF_WITH_PROGRAM_HANDLER 0
167 
168 /* Web server */
169 #undef WEBSERVER_CONF_LOG_ENABLED
170 #define HTTPD_CONF_CGI 0
171 #define HTTPD_CONF_SCRIPT 0
172 #define HTTPD_CONF_STATISTICS 0
173 
174 /* unused yet */
175 #define VNC_CONF_REFRESH_ROWS 8
176 
177 #define WWW_CONF_WEBPAGE_WIDTH 76
178 #define WWW_CONF_WEBPAGE_HEIGHT 30
179 #define WWW_CONF_HISTORY_SIZE 40
180 #define WWW_CONF_MAX_URLLEN 200
181 #define WWW_CONF_MAX_NUMPAGEWIDGETS 80
182 #define WWW_CONF_RENDERSTATE 1
183 #define WWW_CONF_FORMS 1
184 #define WWW_CONF_MAX_FORMACTIONLEN 200
185 #define WWW_CONF_MAX_FORMNAMELEN 200
186 #define WWW_CONF_MAX_INPUTNAMELEN 200
187 #define WWW_CONF_MAX_INPUTVALUELEN 240
188 #define WWW_CONF_PAGEVIEW 1
189 
190 #endif /* __CONTIKI_CONF_H__ */