This is an OSC library for the mbed, created to be compatible with Recotana\'s OSCClass library (http://recotana.com) for the Arduino with Ethernet shield. I have also used parts of the OSC Transceiver(Sender/Receiver) code by xshige. It has many limitations, but it works for simple things (check comments on the mbedOSC.h). It will be evolving. written by: Alvaro Cassinelli, 7.10.2011
EthernetNetIf/LPC1768/lwip/arch/cc.h@0:f76708a93fb3, 2011-10-15 (annotated)
- Committer:
- mbedalvaro
- Date:
- Sat Oct 15 14:15:55 2011 +0000
- Revision:
- 0:f76708a93fb3
First working test of this simple OSC library.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbedalvaro | 0:f76708a93fb3 | 1 | /* |
mbedalvaro | 0:f76708a93fb3 | 2 | * Author: Adam Dunkels <adam@sics.se> |
mbedalvaro | 0:f76708a93fb3 | 3 | * |
mbedalvaro | 0:f76708a93fb3 | 4 | */ |
mbedalvaro | 0:f76708a93fb3 | 5 | #ifndef __LWIP_ARCH_CC_H__ |
mbedalvaro | 0:f76708a93fb3 | 6 | #define __LWIP_ARCH_CC_H__ |
mbedalvaro | 0:f76708a93fb3 | 7 | |
mbedalvaro | 0:f76708a93fb3 | 8 | #define LITTLE_ENDIAN 1234 |
mbedalvaro | 0:f76708a93fb3 | 9 | |
mbedalvaro | 0:f76708a93fb3 | 10 | #define BYTE_ORDER LITTLE_ENDIAN |
mbedalvaro | 0:f76708a93fb3 | 11 | |
mbedalvaro | 0:f76708a93fb3 | 12 | typedef unsigned char u8_t; |
mbedalvaro | 0:f76708a93fb3 | 13 | typedef signed char s8_t; |
mbedalvaro | 0:f76708a93fb3 | 14 | typedef unsigned short u16_t; |
mbedalvaro | 0:f76708a93fb3 | 15 | typedef signed short s16_t; |
mbedalvaro | 0:f76708a93fb3 | 16 | typedef unsigned int u32_t; |
mbedalvaro | 0:f76708a93fb3 | 17 | typedef signed int s32_t; |
mbedalvaro | 0:f76708a93fb3 | 18 | typedef unsigned int mem_ptr_t; |
mbedalvaro | 0:f76708a93fb3 | 19 | |
mbedalvaro | 0:f76708a93fb3 | 20 | #ifndef NULL |
mbedalvaro | 0:f76708a93fb3 | 21 | #define NULL 0 |
mbedalvaro | 0:f76708a93fb3 | 22 | #endif |
mbedalvaro | 0:f76708a93fb3 | 23 | |
mbedalvaro | 0:f76708a93fb3 | 24 | #ifndef TRUE |
mbedalvaro | 0:f76708a93fb3 | 25 | #define TRUE 1 |
mbedalvaro | 0:f76708a93fb3 | 26 | #endif |
mbedalvaro | 0:f76708a93fb3 | 27 | |
mbedalvaro | 0:f76708a93fb3 | 28 | #ifndef FALSE |
mbedalvaro | 0:f76708a93fb3 | 29 | #define FALSE 0 |
mbedalvaro | 0:f76708a93fb3 | 30 | #endif |
mbedalvaro | 0:f76708a93fb3 | 31 | |
mbedalvaro | 0:f76708a93fb3 | 32 | #include <stdlib.h> |
mbedalvaro | 0:f76708a93fb3 | 33 | #define LWIP_RAND rand |
mbedalvaro | 0:f76708a93fb3 | 34 | |
mbedalvaro | 0:f76708a93fb3 | 35 | #define LWIP_PLATFORM_DIAG(x) DBG x |
mbedalvaro | 0:f76708a93fb3 | 36 | #define LWIP_PLATFORM_ASSERT(x) DBG(x) |
mbedalvaro | 0:f76708a93fb3 | 37 | |
mbedalvaro | 0:f76708a93fb3 | 38 | #define LWIP_PROVIDE_ERRNO |
mbedalvaro | 0:f76708a93fb3 | 39 | |
mbedalvaro | 0:f76708a93fb3 | 40 | #define U16_F "hu" |
mbedalvaro | 0:f76708a93fb3 | 41 | #define S16_F "hd" |
mbedalvaro | 0:f76708a93fb3 | 42 | #define X16_F "hx" |
mbedalvaro | 0:f76708a93fb3 | 43 | #define U32_F "lu" |
mbedalvaro | 0:f76708a93fb3 | 44 | #define S32_F "ld" |
mbedalvaro | 0:f76708a93fb3 | 45 | #define X32_F "lx" |
mbedalvaro | 0:f76708a93fb3 | 46 | |
mbedalvaro | 0:f76708a93fb3 | 47 | #if 0 |
mbedalvaro | 0:f76708a93fb3 | 48 | /*Create compilation problems, and according to http://www.mail-archive.com/lwip-users@nongnu.org/msg06786.html, |
mbedalvaro | 0:f76708a93fb3 | 49 | lwIP uses packed structures, so packing the field is not really a good idea ;) */ |
mbedalvaro | 0:f76708a93fb3 | 50 | #define PACK_STRUCT_FIELD(x) __packed x |
mbedalvaro | 0:f76708a93fb3 | 51 | #else |
mbedalvaro | 0:f76708a93fb3 | 52 | #define PACK_STRUCT_FIELD(x) x |
mbedalvaro | 0:f76708a93fb3 | 53 | #endif |
mbedalvaro | 0:f76708a93fb3 | 54 | |
mbedalvaro | 0:f76708a93fb3 | 55 | #define PACK_STRUCT_STRUCT |
mbedalvaro | 0:f76708a93fb3 | 56 | #define PACK_STRUCT_BEGIN __packed |
mbedalvaro | 0:f76708a93fb3 | 57 | #define PACK_STRUCT_END |
mbedalvaro | 0:f76708a93fb3 | 58 | |
mbedalvaro | 0:f76708a93fb3 | 59 | #define LWIP_CHKSUM_ALGORITHM 3 |
mbedalvaro | 0:f76708a93fb3 | 60 | |
mbedalvaro | 0:f76708a93fb3 | 61 | |
mbedalvaro | 0:f76708a93fb3 | 62 | #endif /* __LWIP_ARCH_CC_H__ */ |