Stripped down version of Segundos NetService library (http://mbed.org/users/segundo/libraries/NetServices ). I have removed all NetServices, and all functions which had been disabled. Use this version when you need only pure TCP or UDP functions - this library compiles faster.
Dependents: christmasLights device_server pop3demo device_server_udp ... more
lwip/arch/cc.h@0:8b387bed54c2, 2011-01-10 (annotated)
- Committer:
- hlipka
- Date:
- Mon Jan 10 21:03:11 2011 +0000
- Revision:
- 0:8b387bed54c2
initial version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
hlipka | 0:8b387bed54c2 | 1 | /* |
hlipka | 0:8b387bed54c2 | 2 | * Author: Adam Dunkels <adam@sics.se> |
hlipka | 0:8b387bed54c2 | 3 | * |
hlipka | 0:8b387bed54c2 | 4 | */ |
hlipka | 0:8b387bed54c2 | 5 | #ifndef __LWIP_ARCH_CC_H__ |
hlipka | 0:8b387bed54c2 | 6 | #define __LWIP_ARCH_CC_H__ |
hlipka | 0:8b387bed54c2 | 7 | |
hlipka | 0:8b387bed54c2 | 8 | #define LITTLE_ENDIAN 1234 |
hlipka | 0:8b387bed54c2 | 9 | |
hlipka | 0:8b387bed54c2 | 10 | #define BYTE_ORDER LITTLE_ENDIAN |
hlipka | 0:8b387bed54c2 | 11 | |
hlipka | 0:8b387bed54c2 | 12 | typedef unsigned char u8_t; |
hlipka | 0:8b387bed54c2 | 13 | typedef signed char s8_t; |
hlipka | 0:8b387bed54c2 | 14 | typedef unsigned short u16_t; |
hlipka | 0:8b387bed54c2 | 15 | typedef signed short s16_t; |
hlipka | 0:8b387bed54c2 | 16 | typedef unsigned int u32_t; |
hlipka | 0:8b387bed54c2 | 17 | typedef signed int s32_t; |
hlipka | 0:8b387bed54c2 | 18 | typedef unsigned int mem_ptr_t; |
hlipka | 0:8b387bed54c2 | 19 | |
hlipka | 0:8b387bed54c2 | 20 | #ifndef NULL |
hlipka | 0:8b387bed54c2 | 21 | #define NULL 0 |
hlipka | 0:8b387bed54c2 | 22 | #endif |
hlipka | 0:8b387bed54c2 | 23 | |
hlipka | 0:8b387bed54c2 | 24 | #ifndef TRUE |
hlipka | 0:8b387bed54c2 | 25 | #define TRUE 1 |
hlipka | 0:8b387bed54c2 | 26 | #endif |
hlipka | 0:8b387bed54c2 | 27 | |
hlipka | 0:8b387bed54c2 | 28 | #ifndef FALSE |
hlipka | 0:8b387bed54c2 | 29 | #define FALSE 0 |
hlipka | 0:8b387bed54c2 | 30 | #endif |
hlipka | 0:8b387bed54c2 | 31 | |
hlipka | 0:8b387bed54c2 | 32 | #include <stdlib.h> |
hlipka | 0:8b387bed54c2 | 33 | #define LWIP_RAND rand |
hlipka | 0:8b387bed54c2 | 34 | |
hlipka | 0:8b387bed54c2 | 35 | #define LWIP_PLATFORM_DIAG(x) DBG x |
hlipka | 0:8b387bed54c2 | 36 | #define LWIP_PLATFORM_ASSERT(x) DBG(x) |
hlipka | 0:8b387bed54c2 | 37 | |
hlipka | 0:8b387bed54c2 | 38 | #define LWIP_PROVIDE_ERRNO |
hlipka | 0:8b387bed54c2 | 39 | |
hlipka | 0:8b387bed54c2 | 40 | #define U16_F "hu" |
hlipka | 0:8b387bed54c2 | 41 | #define S16_F "hd" |
hlipka | 0:8b387bed54c2 | 42 | #define X16_F "hx" |
hlipka | 0:8b387bed54c2 | 43 | #define U32_F "lu" |
hlipka | 0:8b387bed54c2 | 44 | #define S32_F "ld" |
hlipka | 0:8b387bed54c2 | 45 | #define X32_F "lx" |
hlipka | 0:8b387bed54c2 | 46 | |
hlipka | 0:8b387bed54c2 | 47 | #if 0 |
hlipka | 0:8b387bed54c2 | 48 | /*Create compilation problems, and according to http://www.mail-archive.com/lwip-users@nongnu.org/msg06786.html, |
hlipka | 0:8b387bed54c2 | 49 | lwIP uses packed structures, so packing the field is not really a good idea ;) */ |
hlipka | 0:8b387bed54c2 | 50 | #define PACK_STRUCT_FIELD(x) __packed x |
hlipka | 0:8b387bed54c2 | 51 | #else |
hlipka | 0:8b387bed54c2 | 52 | #define PACK_STRUCT_FIELD(x) x |
hlipka | 0:8b387bed54c2 | 53 | #endif |
hlipka | 0:8b387bed54c2 | 54 | |
hlipka | 0:8b387bed54c2 | 55 | #define PACK_STRUCT_STRUCT |
hlipka | 0:8b387bed54c2 | 56 | #define PACK_STRUCT_BEGIN __packed |
hlipka | 0:8b387bed54c2 | 57 | #define PACK_STRUCT_END |
hlipka | 0:8b387bed54c2 | 58 | |
hlipka | 0:8b387bed54c2 | 59 | #define LWIP_CHKSUM_ALGORITHM 3 |
hlipka | 0:8b387bed54c2 | 60 | |
hlipka | 0:8b387bed54c2 | 61 | |
hlipka | 0:8b387bed54c2 | 62 | #endif /* __LWIP_ARCH_CC_H__ */ |