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