Some quick code to use UDP-only (no TCP) with mBed. Echos received packets and sends packets when a button is pressed
cc.h
00001 /* 00002 * Author: Adam Dunkels <adam@sics.se> 00003 * 00004 */ 00005 #ifndef __LWIP_ARCH_CC_H__ 00006 #define __LWIP_ARCH_CC_H__ 00007 00008 #define LITTLE_ENDIAN 1234 00009 00010 #define BYTE_ORDER LITTLE_ENDIAN 00011 00012 typedef unsigned char u8_t; 00013 typedef signed char s8_t; 00014 typedef unsigned short u16_t; 00015 typedef signed short s16_t; 00016 typedef unsigned int u32_t; 00017 typedef signed int s32_t; 00018 typedef unsigned int mem_ptr_t; 00019 00020 #ifndef NULL 00021 #define NULL 0 00022 #endif 00023 00024 #ifndef TRUE 00025 #define TRUE 1 00026 #endif 00027 00028 #ifndef FALSE 00029 #define FALSE 0 00030 #endif 00031 00032 #define LWIP_PLATFORM_DIAG(x) printf x 00033 #define LWIP_PLATFORM_ASSERT(x) 00034 00035 #define LWIP_PROVIDE_ERRNO 00036 00037 #define U16_F "hu" 00038 #define S16_F "hd" 00039 #define X16_F "hx" 00040 #define U32_F "lu" 00041 #define S32_F "ld" 00042 #define X32_F "lx" 00043 00044 #define PACK_STRUCT_FIELD(x) __packed x 00045 #define PACK_STRUCT_STRUCT 00046 #define PACK_STRUCT_BEGIN __packed 00047 #define PACK_STRUCT_END 00048 00049 00050 #endif /* __LWIP_ARCH_CC_H__ */
Generated on Tue Jul 12 2022 19:17:23 by 1.7.2