Contiki 2.5
z80def.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: z80def.h,v 1.8 2009/12/16 06:47:17 matsutsuka Exp $
31  *
32  */
33 
34 /*
35  * \file
36  * This file contains a set of configuration for using SDCC as a compiler.
37  *
38  * \author
39  * Takahide Matsutsuka <markn@markn.org>
40  */
41 
42 #ifndef __Z80_DEF_H__
43 #define __Z80_DEF_H__
44 
45 #define CC_CONF_FUNCTION_POINTER_ARGS 1
46 #define CC_CONF_FASTCALL
47 #define CC_CONF_VA_ARGS 0
48 #define CC_CONF_UNSIGNED_CHAR_BUGS 0
49 #define CC_CONF_REGISTER_ARGS 0
50 
51 
52 /* Generic types. */
53 typedef signed char int8_t;
54 typedef unsigned char uint8_t;
55 typedef signed short int16_t;
56 typedef unsigned short uint16_t;
57 typedef unsigned long uint32_t;
58 typedef unsigned char u8_t; /* 8 bit type */
59 typedef unsigned short u16_t; /* 16 bit type */
60 typedef unsigned long u32_t; /* 32 bit type */
61 typedef signed long s32_t; /* 32 bit type */
62 typedef unsigned short uip_stats_t;
63 typedef signed long int32_t; /* 32 bit type */
64 #ifndef _SIZE_T_DEFINED
65 #define _SIZE_T_DEFINED
66 typedef unsigned int size_t;
67 #endif
68 
69 /* Compiler configurations */
70 #define CCIF
71 #define CLIF
72 #define CC_CONF_CONST_FUNCTION_BUG
73 
74 /*
75  * Enable architecture-depend checksum calculation
76  * for uIP configuration.
77  * @see uip_arch.h
78  * @see uip_arch-asm.S
79  */
80 #define UIP_ARCH_ADD32 1
81 #define UIP_ARCH_CHKSUM 1
82 #define UIP_ARCH_IPCHKSUM
83 
84 #define CC_CONF_ASSIGN_AGGREGATE(dest, src) \
85  memcpy(dest, src, sizeof(*dest))
86 
87 #define uip_ipaddr_copy(dest, src) \
88  memcpy(dest, src, sizeof(*dest))
89 
90 #define snprintf(a...)
91 
92 #endif /* __Z80_DEF_H__ */