SNMP agent attached to SPI slave

Dependencies:   mbed

Committer:
lorcansmith
Date:
Mon Aug 13 15:07:40 2012 +0000
Revision:
0:2a53a4c3238c
v1.1 release includes ioAlarm traps

Who changed what in which revision?

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