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