Contiki 2.6
|
00001 /* 00002 * Copyright (c) 2007, Swedish Institute of Computer Science 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 copyright 00011 * notice, this list of conditions and the following disclaimer in the 00012 * documentation and/or other materials provided with the distribution. 00013 * 3. Neither the name of the Institute nor the names of its contributors 00014 * may be used to endorse or promote products derived from this software 00015 * without specific prior written permission. 00016 * 00017 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 00018 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00019 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00020 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 00021 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00022 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 00023 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00024 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00025 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 00026 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00027 * SUCH DAMAGE. 00028 * 00029 * This file is part of the Contiki operating system. 00030 * 00031 * Author: Oliver Schmidt <ol.sc@web.de> 00032 * 00033 * @(#)$Id: 6502def.h,v 1.27 2010/10/22 20:28:58 oliverschmidt Exp $ 00034 */ 00035 00036 #ifndef __6502DEF_H__ 00037 #define __6502DEF_H__ 00038 00039 #include <ctype.h> 00040 #include <conio.h> 00041 #include <fcntl.h> 00042 #include <stdio.h> 00043 #include <stdint.h> 00044 #include <unistd.h> 00045 00046 #include "pfs.h" 00047 00048 /* These names are deprecated, use C99 names. */ 00049 typedef uint8_t u8_t; 00050 typedef uint16_t u16_t; 00051 typedef uint32_t u32_t; 00052 typedef int32_t s32_t; 00053 00054 #define CC_CONF_REGISTER_ARGS 1 00055 #define CC_CONF_FASTCALL __fastcall__ 00056 00057 #define CCIF 00058 #define CLIF 00059 00060 #define HAVE_SNPRINTF 00061 #define snprintf(buf, len, ...) sprintf(buf, __VA_ARGS__) 00062 00063 #define CLOCK_CONF_SECOND 2 00064 typedef unsigned short clock_time_t; 00065 00066 typedef unsigned short uip_stats_t; 00067 00068 #define UIP_ARCH_ADD32 1 00069 #define UIP_ARCH_CHKSUM 1 00070 00071 #define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE 1 00072 00073 #define LOADER_CONF_ARCH "lib/unload.h" 00074 00075 #if MTU_SIZE 00076 #define UIP_CONF_BUFFER_SIZE (UIP_LLH_LEN + MTU_SIZE) 00077 #else /* MTU_SIZE */ 00078 #define UIP_CONF_BUFFER_SIZE (UIP_LLH_LEN + 1500) 00079 #endif /* MTU_SIZE */ 00080 00081 #if CONNECTIONS 00082 #define UIP_CONF_MAX_CONNECTIONS CONNECTIONS 00083 #else /* CONNECTIONS */ 00084 #define UIP_CONF_MAX_CONNECTIONS 10 00085 #endif /* CONNECTIONS */ 00086 00087 #if WITH_LOGGING 00088 #define LOG_CONF_ENABLED 1 00089 #define UIP_CONF_LOGGING 1 00090 #else /* WITH_LOGGING */ 00091 #define LOG_CONF_ENABLED 0 00092 #define UIP_CONF_LOGGING 0 00093 #endif /* WITH_LOGGING */ 00094 00095 #if WITH_BOOST 00096 #define UIP_CONF_TCP_SPLIT 1 00097 #else /* WITH_BOOST */ 00098 #define UIP_CONF_TCP_SPLIT 0 00099 #endif /* WITH_BOOST */ 00100 00101 #if WITH_FORWARDING 00102 #define UIP_CONF_IP_FORWARD 1 00103 #else /* WITH_FORWARDING */ 00104 #define UIP_CONF_IP_FORWARD 0 00105 #endif /* WITH_FORWARDING */ 00106 00107 #if WITH_CLIENT 00108 #define UIP_CONF_ACTIVE_OPEN 1 00109 #else /* WITH_CLIENT */ 00110 #define UIP_CONF_ACTIVE_OPEN 0 00111 #endif /* WITH_CLIENT */ 00112 00113 #if WITH_DNS 00114 #define UIP_CONF_UDP 1 00115 #else /* WITH_DNS */ 00116 #define UIP_CONF_UDP 0 00117 #endif /* WITH_DNS */ 00118 00119 #define CTK_CONF_WIDGET_FLAGS 0 00120 #define CTK_CONF_WINDOWS 0 00121 #define CTK_CONF_WINDOWMOVE 0 00122 #define CTK_CONF_WINDOWCLOSE 0 00123 #define CTK_CONF_ICONS 0 00124 #define CTK_CONF_MENUS 0 00125 #define CTK_CONF_SCREENSAVER 0 00126 00127 #if WITH_MOUSE 00128 #define CTK_CONF_MOUSE_SUPPORT 1 00129 #else /* WITH_MOUSE */ 00130 #define CTK_CONF_MOUSE_SUPPORT 0 00131 #endif /* WITH_MOUSE */ 00132 00133 #define ctk_arch_keyavail kbhit 00134 #define ctk_arch_getkey cgetc 00135 #define ctk_arch_isprint isprint 00136 00137 #define CFS_CONF_OFFSET_TYPE off_t 00138 00139 #if WITH_PFS 00140 #define cfs_open pfs_open 00141 #define cfs_close pfs_close 00142 #define cfs_read pfs_read 00143 #define cfs_write pfs_write 00144 #define cfs_seek pfs_seek 00145 #define cfs_remove pfs_remove 00146 #else /* WITH_PFS */ 00147 #define CFS_READ (O_RDONLY) 00148 #define CFS_WRITE (O_WRONLY | O_CREAT | O_TRUNC) 00149 #define CFS_SEEK_SET (SEEK_SET) 00150 #define CFS_SEEK_CUR (SEEK_CUR) 00151 #define CFS_SEEK_END (SEEK_END) 00152 #define cfs_open open 00153 #define cfs_close close 00154 #define cfs_read read 00155 #define cfs_write write 00156 #define cfs_seek lseek 00157 #define cfs_remove remove 00158 #endif /* WITH_PFS */ 00159 00160 #endif /* __6502DEF_H__ */