contiki-conf.h

00001 /*
00002  * Copyright (c) 2007, Takahide Matsutsuka.
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  * 1. Redistributions of source code must retain the above copyright
00009  *    notice, this list of conditions and the following disclaimer.
00010  * 2. Redistributions in binary form must reproduce the above
00011  *    copyright notice, this list of conditions and the following
00012  *    disclaimer in the documentation and/or other materials provided
00013  *    with the distribution.
00014  * 3. The name of the author may not be used to endorse or promote
00015  *    products derived from this software without specific prior
00016  *    written permission.
00017  *
00018  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
00019  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00020  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00021  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
00022  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00023  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
00024  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00025  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00026  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00027  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00028  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00029  *
00030  * $Id: contiki-conf.h,v 1.6 2008/02/15 16:51:06 oliverschmidt Exp $
00031  *
00032  */
00033 
00034 /*
00035  * \file
00036  *      contiki-conf.h
00037  *      A set of configurations of contiki for PC-6001 family. 
00038  * \author
00039  *      Takahide Matsutsuka <markn@markn.org>
00040  */
00041 
00042 #ifndef __CONTIKI_CONF_H__
00043 #define __CONTIKI_CONF_H__
00044 
00045 #include "z80def.h"
00046 #include "sys/cc.h"
00047 #include <ctype.h>
00048 #include <string.h>
00049 #include "ctk/ctk_arch.h"
00050 #include "strcasecmp.h"
00051 #include "log.h"
00052 
00053 /* Time type. */
00054 typedef unsigned long clock_time_t;
00055 
00056 /* Defines tick counts for a second. */
00057 #define CLOCK_CONF_SECOND               1024
00058 
00059 #define rtimer_arch_now()       clock_time()
00060 
00061 /* Memory filesystem RAM size. */
00062 #define CFS_RAM_CONF_SIZE               512
00063 
00064 /* Logging.. */
00065 #define LOG_CONF_ENABLED                0
00066 
00067 #undef MALLOC_TEST
00068 
00069 /*---------------------------------------------------------------------------*/
00070 /* screen properties */
00071 #define LIBCONIO_CONF_ATTRIBUTES_ENABLED
00072 #if defined(ARCH_PC6001MK2)
00073 #define LIBCONIO_VRAM_ATTR              0x4000
00074 #define LIBCONIO_VRAM_CHAR              0x4400
00075 #define LIBCONIO_CONF_SCREEN_WIDTH      40
00076 #define LIBCONIO_CONF_SCREEN_HEIGHT     20
00077 #define LIBCONIO_COLOR_NORMAL           0x0f
00078 #define LIBCONIO_COLOR_REVERSED         0x70
00079 #elif (defined(ARCH_PC6001) || defined(ARCH_PC6001A)) && defined(MEMORY_16K)
00080 #define LIBCONIO_VRAM_ATTR              0xc000
00081 #define LIBCONIO_VRAM_CHAR              0xc200
00082 #define LIBCONIO_CONF_SCREEN_WIDTH      32
00083 #define LIBCONIO_CONF_SCREEN_HEIGHT     16
00084 #define LIBCONIO_COLOR_NORMAL           0x20
00085 #define LIBCONIO_COLOR_REVERSED         0x21
00086 #elif (defined(ARCH_PC6001) || defined(ARCH_PC6001A)) && (defined(MEMORY_32K) || defined(MEMORY_ROM))
00087 #define LIBCONIO_VRAM_ATTR              0x8000
00088 #define LIBCONIO_VRAM_CHAR              0x8200
00089 #define LIBCONIO_CONF_SCREEN_WIDTH      32
00090 #define LIBCONIO_CONF_SCREEN_HEIGHT     16
00091 #define LIBCONIO_COLOR_NORMAL           0x20
00092 #define LIBCONIO_COLOR_REVERSED         0x21
00093 #else
00094 #error Specify appropriate ARCH & MEMORY combination
00095 #endif /*  ARCH_PC6001MK2 */
00096 
00097 #if 0 /* ctk-conio case */
00098 #define SCREENCOLOR             0x20
00099 #define BORDERCOLOR             0x20
00100 #define WIDGETCOLOR             0x20
00101 #define WIDGETCOLOR_FWIN        0x20
00102 #define BACKGROUNDCOLOR         0x20
00103 #define DIALOGCOLOR             0x20
00104 #define WINDOWCOLOR             0x20
00105 #define WINDOWCOLOR_FOCUS       0x21
00106 #define MENUCOLOR               0x21
00107 #define MENUCOLOR               0x21
00108 #define OPENMENUCOLOR           0x22
00109 #define ACTIVEMENUITEMCOLOR     0x23
00110 #define WIDGETCOLOR_HLINK       0x21
00111 #define WIDGETCOLOR_FOCUS       0x20
00112 #define WIDGETCOLOR_DIALOG      0x22
00113 #endif
00114 
00115 /* uIP configuration */
00116 #define UIP_CONF_MAX_CONNECTIONS        4
00117 #define UIP_CONF_MAX_LISTENPORTS        4
00118 #define UIP_CONF_BUFFER_SIZE            400
00119 #define UIP_CONF_BYTE_ORDER             LITTLE_ENDIAN
00120 #define UIP_CONF_TCP_SPLIT              0
00121 #define UIP_CONF_LOGGING                0
00122 
00123 /* uses SLIP */
00124 #define UIP_CONF_UDP                    0
00125 #define UIP_CONF_UDP_CHECKSUMS          0
00126 #define UIP_CONF_LLH_LEN                0
00127 #undef UIP_CONF_BROADCAST
00128 #undef RS232_CONF_CALLBACK
00129 /* #define RS232_CONF_CALLBACK             serial_input_byte */
00130 #define slip_arch_init(ubr)             rs232_arch_init(ubr)
00131 #define slip_arch_writeb(c)             rs232_arch_writeb(c)
00132 
00133 #ifdef WITH_LOADER_ARCH
00134 //#define AUTOSTART_ENABLE                1
00135 #define LOADER_CONF_ARCH                "loader_arch.h"
00136 #endif /* WITH_LOADER_ARCH */
00137 
00138 /*---------------------------------------------------------------------------*/
00139 /* Application specific configurations. */
00140 
00141 /* Command shell */
00142 #define SHELL_GUI_CONF_XSIZE            26
00143 #define SHELL_GUI_CONF_YSIZE            10
00144 
00145 /* Text editor */
00146 #define EDITOR_CONF_WIDTH               26
00147 #define EDITOR_CONF_HEIGHT               8
00148 
00149 /* Process list */
00150 #define PROCESSLIST_CONF_HEIGHT 12
00151 
00152 /* File dialog */
00153 #define FILES_CONF_HEIGHT                6
00154 
00155 /* Shell */
00156 //#define SHELL_CONF_WITH_PROGRAM_HANDLER        1
00157 
00158 /* Telnet */
00159 #define TELNET_CONF_WINDOW_WIDTH        30
00160 #define TELNET_CONF_WINDOW_HEIGHT       13
00161 //#define TELNET_CONF_TEXTAREA_HEIGHT      5 // TELNET_WINDOW_HEIGHT - 8
00162 //#define TELNET_CONF_ENTRY_WIDTH         22 // TELNET_WINDOW_WIDTH - 8
00163 
00164 /* Telnetd */
00165 #define TELNETD_CONF_GUI                 0
00166 #define SHELL_CONF_WITH_PROGRAM_HANDLER              0
00167 
00168 /* Web server */
00169 #undef WEBSERVER_CONF_LOG_ENABLED
00170 #define HTTPD_CONF_CGI          0
00171 #define HTTPD_CONF_SCRIPT       0
00172 #define HTTPD_CONF_STATISTICS   0
00173 
00174 /* unused yet */
00175 #define VNC_CONF_REFRESH_ROWS    8
00176 
00177 #define WWW_CONF_WEBPAGE_WIDTH 76
00178 #define WWW_CONF_WEBPAGE_HEIGHT 30
00179 #define WWW_CONF_HISTORY_SIZE 40
00180 #define WWW_CONF_MAX_URLLEN 200
00181 #define WWW_CONF_MAX_NUMPAGEWIDGETS 80
00182 #define WWW_CONF_RENDERSTATE 1
00183 #define WWW_CONF_FORMS       1
00184 #define WWW_CONF_MAX_FORMACTIONLEN  200
00185 #define WWW_CONF_MAX_FORMNAMELEN    200
00186 #define WWW_CONF_MAX_INPUTNAMELEN   200
00187 #define WWW_CONF_MAX_INPUTVALUELEN  240
00188 #define WWW_CONF_PAGEVIEW 1
00189 
00190 #endif /* __CONTIKI_CONF_H__ */

Generated on Mon Apr 11 14:23:41 2011 for Contiki 2.5 by  doxygen 1.6.1