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