OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [net/] [lwip_tcpip/] [current/] [include/] [arch/] [cc.h] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
//==========================================================================
2
//####ECOSGPLCOPYRIGHTBEGIN####
3
// -------------------------------------------
4
// This file is part of eCos, the Embedded Configurable Operating System.
5
// Copyright (C) 2008, 2011 Free Software Foundation
6
//
7
// eCos is free software; you can redistribute it and/or modify it under
8
// the terms of the GNU General Public License as published by the Free
9
// Software Foundation; either version 2 or (at your option) any later version.
10
//
11
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
12
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14
// for more details.
15
//
16
// You should have received a copy of the GNU General Public License along
17
// with eCos; if not, write to the Free Software Foundation, Inc.,
18
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
19
//
20
// As a special exception, if other files instantiate templates or use macros
21
// or inline functions from this file, or you compile this file and link it
22
// with other works to produce a work based on this file, this file does not
23
// by itself cause the resulting work to be covered by the GNU General Public
24
// License. However the source code for this file must still be made available
25
// in accordance with section (3) of the GNU General Public License.
26
//
27
// This exception does not invalidate any other reasons why a work based on
28
// this file might be covered by the GNU General Public License.
29
// -------------------------------------------
30
//####ECOSGPLCOPYRIGHTEND####
31
//==========================================================================
32
 
33
#ifndef __LWIP_ARCH_CC_H__
34
#define __LWIP_ARCH_CC_H__
35
 
36
#include <string.h>
37
#include <errno.h>
38
#include <cyg/infra/cyg_type.h>
39
 
40
typedef int sys_prot_t;
41
 
42
#define LWIP_ERR_T int
43
 
44
// Define error codes used by lwIP but not by eCos
45
#define EFAULT          14
46
#define ELOOP           40
47
#define ETIME           62
48
#define ENSRNOTFOUND    163
49
 
50
// If errno support, define ERRNO used in api/sockets.c
51
#if CYGINT_ISO_ERRNO > 0
52
#define ERRNO
53
#endif
54
 
55
// Platform byteorder
56
#if (CYG_BYTEORDER == CYG_LSBFIRST)
57
#define BYTE_ORDER LITTLE_ENDIAN
58
#else
59
#define BYTE_ORDER BIG_ENDIAN
60
#endif
61
 
62
// Define generic types used in lwIP
63
#ifndef __U8_T__
64
typedef unsigned char u8_t;
65
# define __U8_T__
66
#endif
67
 
68
#ifndef __S8_T__
69
typedef signed char s8_t;
70
# define __S8_T__
71
#endif
72
 
73
#ifndef __U16_T__
74
typedef unsigned short u16_t;
75
# define __U16_T__
76
#endif
77
 
78
#ifndef __S16_T__
79
typedef signed short s16_t;
80
# define __S16_T__
81
#endif
82
 
83
#ifndef __U32_T__
84
typedef unsigned long u32_t;
85
# define __U32_T__
86
#endif
87
 
88
#ifndef __S32_T__
89
typedef signed long s32_t;
90
# define __S32_T__
91
#endif
92
 
93
typedef unsigned    long    mem_ptr_t;
94
 
95
// Define (sn)printf formatters for these lwIP types
96
#define U16_F "u"
97
#define S16_F "d"
98
#define X16_F "x"
99
#define U32_F "lu"
100
#define S32_F "ld"
101
#define X32_F "lx"
102
 
103
// Compiler hints for packing structures
104
#define PACK_STRUCT_FIELD(x) x
105
#define PACK_STRUCT_STRUCT __attribute__((packed))
106
#define PACK_STRUCT_BEGIN
107
#define PACK_STRUCT_END
108
 
109
// Prototypes for printf() and abort()
110
#include <cyg/infra/diag.h>
111
#include <cyg/infra/cyg_ass.h>
112
// Plaform specific diagnostic output
113
#define LWIP_PLATFORM_DIAG(x) do {diag_printf x;} while(0)
114
#define LWIP_PLATFORM_ASSERT(x) do {CYG_FAIL(x);} while(0)
115
 
116
#endif // __LWIP_ARCH_CC_H__

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.