Web server based weather station using Sparkfun Weather Meters.

Dependencies:   FatFileSystem mbed WeatherMeters SDFileSystem

Committer:
AdamGreen
Date:
Sat Feb 25 03:28:05 2012 +0000
Revision:
1:c7958aa34fa1
Parent:
0:616601bde9fb
Use published libraries where possible.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AdamGreen 0:616601bde9fb 1 /*
AdamGreen 0:616601bde9fb 2 * Author: Adam Dunkels <adam@sics.se>
AdamGreen 0:616601bde9fb 3 *
AdamGreen 0:616601bde9fb 4 */
AdamGreen 0:616601bde9fb 5 #ifndef __LWIP_ARCH_CC_H__
AdamGreen 0:616601bde9fb 6 #define __LWIP_ARCH_CC_H__
AdamGreen 0:616601bde9fb 7 #include <mbed.h>
AdamGreen 0:616601bde9fb 8
AdamGreen 0:616601bde9fb 9 #define LITTLE_ENDIAN 1234
AdamGreen 0:616601bde9fb 10
AdamGreen 0:616601bde9fb 11 #define BYTE_ORDER LITTLE_ENDIAN
AdamGreen 0:616601bde9fb 12
AdamGreen 0:616601bde9fb 13 typedef unsigned char u8_t;
AdamGreen 0:616601bde9fb 14 typedef signed char s8_t;
AdamGreen 0:616601bde9fb 15 typedef unsigned short u16_t;
AdamGreen 0:616601bde9fb 16 typedef signed short s16_t;
AdamGreen 0:616601bde9fb 17 typedef unsigned int u32_t;
AdamGreen 0:616601bde9fb 18 typedef signed int s32_t;
AdamGreen 0:616601bde9fb 19 typedef unsigned int mem_ptr_t;
AdamGreen 0:616601bde9fb 20
AdamGreen 0:616601bde9fb 21 #ifndef NULL
AdamGreen 0:616601bde9fb 22 #define NULL 0
AdamGreen 0:616601bde9fb 23 #endif
AdamGreen 0:616601bde9fb 24
AdamGreen 0:616601bde9fb 25 #ifndef TRUE
AdamGreen 0:616601bde9fb 26 #define TRUE 1
AdamGreen 0:616601bde9fb 27 #endif
AdamGreen 0:616601bde9fb 28
AdamGreen 0:616601bde9fb 29 #ifndef FALSE
AdamGreen 0:616601bde9fb 30 #define FALSE 0
AdamGreen 0:616601bde9fb 31 #endif
AdamGreen 0:616601bde9fb 32
AdamGreen 0:616601bde9fb 33 #define LWIP_RAND rand
AdamGreen 0:616601bde9fb 34
AdamGreen 0:616601bde9fb 35 #define LWIP_PLATFORM_DIAG(x) printf x
AdamGreen 0:616601bde9fb 36 #define LWIP_PLATFORM_ASSERT(x) error(x)
AdamGreen 0:616601bde9fb 37
AdamGreen 0:616601bde9fb 38 #define LWIP_PROVIDE_ERRNO
AdamGreen 0:616601bde9fb 39
AdamGreen 0:616601bde9fb 40 #ifdef __GNUC__
AdamGreen 0:616601bde9fb 41 /* printf() format specifiers used by GCC. */
AdamGreen 0:616601bde9fb 42 #define U16_F "hu"
AdamGreen 0:616601bde9fb 43 #define S16_F "hd"
AdamGreen 0:616601bde9fb 44 #define X16_F "hx"
AdamGreen 0:616601bde9fb 45 #define U32_F "u"
AdamGreen 0:616601bde9fb 46 #define S32_F "d"
AdamGreen 0:616601bde9fb 47 #define X32_F "x"
AdamGreen 0:616601bde9fb 48 #else /* !__GNUC__ */
AdamGreen 0:616601bde9fb 49 /* printf() format specifiers used by ARM compiler. */
AdamGreen 0:616601bde9fb 50 #define U16_F "hu"
AdamGreen 0:616601bde9fb 51 #define S16_F "hd"
AdamGreen 0:616601bde9fb 52 #define X16_F "hx"
AdamGreen 0:616601bde9fb 53 #define U32_F "lu"
AdamGreen 0:616601bde9fb 54 #define S32_F "ld"
AdamGreen 0:616601bde9fb 55 #define X32_F "lx"
AdamGreen 0:616601bde9fb 56 #endif /* __GNUC__ */
AdamGreen 0:616601bde9fb 57
AdamGreen 0:616601bde9fb 58 #if 0
AdamGreen 0:616601bde9fb 59 /*Create compilation problems, and according to http://www.mail-archive.com/lwip-users@nongnu.org/msg06786.html,
AdamGreen 0:616601bde9fb 60 lwIP uses packed structures, so packing the field is not really a good idea ;) */
AdamGreen 0:616601bde9fb 61 #define PACK_STRUCT_FIELD(x) __packed x
AdamGreen 0:616601bde9fb 62 #else
AdamGreen 0:616601bde9fb 63 #define PACK_STRUCT_FIELD(x) x
AdamGreen 0:616601bde9fb 64 #endif
AdamGreen 0:616601bde9fb 65
AdamGreen 0:616601bde9fb 66 #ifdef __GNUC__
AdamGreen 0:616601bde9fb 67 /* Packing for structs in GCC. */
AdamGreen 0:616601bde9fb 68 #define PACK_STRUCT_STRUCT __attribute__((packed))
AdamGreen 0:616601bde9fb 69 #define PACK_STRUCT_BEGIN
AdamGreen 0:616601bde9fb 70 #define PACK_STRUCT_END
AdamGreen 0:616601bde9fb 71 #else /* !__GNUC__ */
AdamGreen 0:616601bde9fb 72 /* Packing for structs in ARM compiler. */
AdamGreen 0:616601bde9fb 73 #define PACK_STRUCT_STRUCT
AdamGreen 0:616601bde9fb 74 #define PACK_STRUCT_BEGIN __packed
AdamGreen 0:616601bde9fb 75 #define PACK_STRUCT_END
AdamGreen 0:616601bde9fb 76 #endif /* __GNUC__ */
AdamGreen 0:616601bde9fb 77
AdamGreen 0:616601bde9fb 78 #define LWIP_CHKSUM_ALGORITHM 3
AdamGreen 0:616601bde9fb 79
AdamGreen 0:616601bde9fb 80
AdamGreen 0:616601bde9fb 81 #endif /* __LWIP_ARCH_CC_H__ */