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