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