Michael Fischler / Mbed 2 deprecated Contest_Winner

Dependencies:   mbed

Committer:
mafischl
Date:
Thu Oct 13 17:02:29 2011 +0000
Revision:
0:d9266031f832

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mafischl 0:d9266031f832 1 /*
mafischl 0:d9266031f832 2 * Author: Adam Dunkels <adam@sics.se>
mafischl 0:d9266031f832 3 *
mafischl 0:d9266031f832 4 */
mafischl 0:d9266031f832 5 #ifndef __LWIP_ARCH_CC_H__
mafischl 0:d9266031f832 6 #define __LWIP_ARCH_CC_H__
mafischl 0:d9266031f832 7
mafischl 0:d9266031f832 8 #define LITTLE_ENDIAN 1234
mafischl 0:d9266031f832 9
mafischl 0:d9266031f832 10 #define BYTE_ORDER LITTLE_ENDIAN
mafischl 0:d9266031f832 11
mafischl 0:d9266031f832 12 typedef unsigned char u8_t;
mafischl 0:d9266031f832 13 typedef signed char s8_t;
mafischl 0:d9266031f832 14 typedef unsigned short u16_t;
mafischl 0:d9266031f832 15 typedef signed short s16_t;
mafischl 0:d9266031f832 16 typedef unsigned int u32_t;
mafischl 0:d9266031f832 17 typedef signed int s32_t;
mafischl 0:d9266031f832 18 typedef unsigned int mem_ptr_t;
mafischl 0:d9266031f832 19
mafischl 0:d9266031f832 20 #ifndef NULL
mafischl 0:d9266031f832 21 #define NULL 0
mafischl 0:d9266031f832 22 #endif
mafischl 0:d9266031f832 23
mafischl 0:d9266031f832 24 #ifndef TRUE
mafischl 0:d9266031f832 25 #define TRUE 1
mafischl 0:d9266031f832 26 #endif
mafischl 0:d9266031f832 27
mafischl 0:d9266031f832 28 #ifndef FALSE
mafischl 0:d9266031f832 29 #define FALSE 0
mafischl 0:d9266031f832 30 #endif
mafischl 0:d9266031f832 31
mafischl 0:d9266031f832 32 #include <stdlib.h>
mafischl 0:d9266031f832 33 #define LWIP_RAND rand
mafischl 0:d9266031f832 34
mafischl 0:d9266031f832 35 #define LWIP_PLATFORM_DIAG(x) DBG x
mafischl 0:d9266031f832 36 #define LWIP_PLATFORM_ASSERT(x) DBG(x)
mafischl 0:d9266031f832 37
mafischl 0:d9266031f832 38 #define LWIP_PROVIDE_ERRNO
mafischl 0:d9266031f832 39
mafischl 0:d9266031f832 40 #define U16_F "hu"
mafischl 0:d9266031f832 41 #define S16_F "hd"
mafischl 0:d9266031f832 42 #define X16_F "hx"
mafischl 0:d9266031f832 43 #define U32_F "lu"
mafischl 0:d9266031f832 44 #define S32_F "ld"
mafischl 0:d9266031f832 45 #define X32_F "lx"
mafischl 0:d9266031f832 46
mafischl 0:d9266031f832 47 #if 0
mafischl 0:d9266031f832 48 /*Create compilation problems, and according to http://www.mail-archive.com/lwip-users@nongnu.org/msg06786.html,
mafischl 0:d9266031f832 49 lwIP uses packed structures, so packing the field is not really a good idea ;) */
mafischl 0:d9266031f832 50 #define PACK_STRUCT_FIELD(x) __packed x
mafischl 0:d9266031f832 51 #else
mafischl 0:d9266031f832 52 #define PACK_STRUCT_FIELD(x) x
mafischl 0:d9266031f832 53 #endif
mafischl 0:d9266031f832 54
mafischl 0:d9266031f832 55 #define PACK_STRUCT_STRUCT
mafischl 0:d9266031f832 56 #define PACK_STRUCT_BEGIN __packed
mafischl 0:d9266031f832 57 #define PACK_STRUCT_END
mafischl 0:d9266031f832 58
mafischl 0:d9266031f832 59 #define LWIP_CHKSUM_ALGORITHM 3
mafischl 0:d9266031f832 60
mafischl 0:d9266031f832 61
mafischl 0:d9266031f832 62 #endif /* __LWIP_ARCH_CC_H__ */