Version of http://mbed.org/cookbook/NetServicesTribute with setting set the same for LPC2368

Dependents:   UDPSocketExample 24LCxx_I2CApp WeatherPlatform_pachube HvZServerLib ... more

Committer:
simon
Date:
Tue Nov 23 14:15:36 2010 +0000
Revision:
0:350011bf8be7
Experimental version for testing UDP

Who changed what in which revision?

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