RetroArch
cc.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2001, Swedish Institute of Computer Science.
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 copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  * 3. Neither the name of the Institute nor the names of its contributors
14  * may be used to endorse or promote products derived from this software
15  * without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
21  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27  * SUCH DAMAGE.
28  *
29  * This file is part of the lwIP TCP/IP stack.
30  *
31  * Author: Adam Dunkels <[email protected]>
32  *
33  */
34 #ifndef __ARCH_CC_H__
35 #define __ARCH_CC_H__
36 
37 #include <stdlib.h>
38 #include <stdio.h>
39 #include <gctypes.h>
40 #include "asm.h"
41 #include "processor.h"
42 
43 typedef u8 u8_t;
44 typedef s8 s8_t;
45 typedef u16 u16_t;
46 typedef s16 s16_t;
47 typedef u32 u32_t;
48 typedef s32 s32_t;
49 typedef u32 mem_ptr_t;
50 
51 
52 #define PACK_STRUCT_FIELD(x) x
53 #define PACK_STRUCT_STRUCT __attribute__((packed))
54 #define PACK_STRUCT_BEGIN
55 #define PACK_STRUCT_END
56 
57 #define LWIP_PLATFORM_ASSERT(x) { printf(x); while (1); }
58 #define LWIP_PLATFORM_DIAG(x) printf x
59 
60 #define SYS_ARCH_DECL_PROTECT(lev) u32 lev
61 #define SYS_ARCH_PROTECT(lev) _CPU_ISR_Disable(lev)
62 #define SYS_ARCH_UNPROTECT(lev) _CPU_ISR_Restore(lev)
63 
64 /* Define (sn)printf formatters for these lwIP types */
65 #define U16_F "hu"
66 #define S16_F "hd"
67 #define X16_F "hx"
68 #define U32_F "u"
69 #define S32_F "d"
70 #define X32_F "x"
71 
72 
73 #endif /* __ARCH_CC_H__ */
s8 s8_t
Definition: cc.h:44
int32_t s32
32bit signed integer
Definition: gctypes.h:24
Data type definitions.
int8_t s8
8bit signed integer
Definition: gctypes.h:22
uint16_t u16
16bit unsigned integer
Definition: gctypes.h:18
s16 s16_t
Definition: cc.h:46
int16_t s16
16bit signed integer
Definition: gctypes.h:23
u8 u8_t
Definition: cc.h:43
u32 mem_ptr_t
Definition: cc.h:49
s32 s32_t
Definition: cc.h:48
u32 u32_t
Definition: cc.h:47
uint8_t u8
8bit unsigned integer
Definition: gctypes.h:17
uint32_t u32
32bit unsigned integer
Definition: gctypes.h:19
u16 u16_t
Definition: cc.h:45