6502def.h

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 MAC_CONF_CHANNEL_CHECK_RATE          1
00072 #define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE 1
00073 
00074 #define LOADER_CONF_ARCH "lib/unload.h"
00075 
00076 #if MTU_SIZE
00077 #define UIP_CONF_BUFFER_SIZE (UIP_LLH_LEN + MTU_SIZE)
00078 #else /* MTU_SIZE */
00079 #define UIP_CONF_BUFFER_SIZE (UIP_LLH_LEN + 1500)
00080 #endif /* MTU_SIZE */
00081 
00082 #if CONNECTIONS
00083 #define UIP_CONF_MAX_CONNECTIONS CONNECTIONS
00084 #else /* CONNECTIONS */
00085 #define UIP_CONF_MAX_CONNECTIONS 10
00086 #endif /* CONNECTIONS */
00087 
00088 #if WITH_LOGGING
00089 #define LOG_CONF_ENABLED 1
00090 #define UIP_CONF_LOGGING 1
00091 #else /* WITH_LOGGING */
00092 #define LOG_CONF_ENABLED 0
00093 #define UIP_CONF_LOGGING 0
00094 #endif /* WITH_LOGGING */
00095 
00096 #if WITH_BOOST
00097 #define UIP_CONF_TCP_SPLIT 1
00098 #else /* WITH_BOOST */
00099 #define UIP_CONF_TCP_SPLIT 0
00100 #endif /* WITH_BOOST */
00101 
00102 #if WITH_FORWARDING
00103 #define UIP_CONF_IP_FORWARD 1
00104 #else /* WITH_FORWARDING */
00105 #define UIP_CONF_IP_FORWARD 0
00106 #endif /* WITH_FORWARDING */
00107 
00108 #if WITH_CLIENT
00109 #define UIP_CONF_ACTIVE_OPEN 1
00110 #else /* WITH_CLIENT */
00111 #define UIP_CONF_ACTIVE_OPEN 0
00112 #endif /* WITH_CLIENT */
00113 
00114 #if WITH_DNS
00115 #define UIP_CONF_UDP 1
00116 #else /* WITH_DNS */
00117 #define UIP_CONF_UDP 0
00118 #endif /* WITH_DNS */
00119 
00120 #define CTK_CONF_WIDGET_FLAGS 0
00121 #define CTK_CONF_WINDOWS      0
00122 #define CTK_CONF_WINDOWMOVE   0
00123 #define CTK_CONF_WINDOWCLOSE  0
00124 #define CTK_CONF_ICONS        0
00125 #define CTK_CONF_MENUS        0
00126 #define CTK_CONF_SCREENSAVER  0
00127 
00128 #if WITH_MOUSE
00129 #define CTK_CONF_MOUSE_SUPPORT 1
00130 #else /* WITH_MOUSE */
00131 #define CTK_CONF_MOUSE_SUPPORT 0
00132 #endif /* WITH_MOUSE */
00133 
00134 #define ctk_arch_keyavail kbhit
00135 #define ctk_arch_getkey   cgetc
00136 #define ctk_arch_isprint  isprint
00137 
00138 #define CFS_CONF_OFFSET_TYPE off_t
00139 
00140 #if WITH_PFS
00141 #define cfs_open     pfs_open
00142 #define cfs_close    pfs_close
00143 #define cfs_read     pfs_read
00144 #define cfs_write    pfs_write
00145 #define cfs_seek     pfs_seek
00146 #define cfs_remove   pfs_remove
00147 #else /* WITH_PFS */
00148 #define CFS_READ     (O_RDONLY)
00149 #define CFS_WRITE    (O_WRONLY | O_CREAT | O_TRUNC)
00150 #define CFS_SEEK_SET (SEEK_SET)
00151 #define CFS_SEEK_CUR (SEEK_CUR)
00152 #define CFS_SEEK_END (SEEK_END)
00153 #define cfs_open     open
00154 #define cfs_close    close
00155 #define cfs_read     read
00156 #define cfs_write    write
00157 #define cfs_seek     lseek
00158 #define cfs_remove   remove
00159 #endif /* WITH_PFS */
00160 
00161 #endif /* __6502DEF_H__ */

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