1 #ifndef MICROPY_INCLUDED_EXTMOD_LWIP_INCLUDE_ARCH_CC_H 2 #define MICROPY_INCLUDED_EXTMOD_LWIP_INCLUDE_ARCH_CC_H 3 4 #include <stdint.h> 5 6 // Generate lwip's internal types from stdint 7 8 typedef uint8_t u8_t; 9 typedef int8_t s8_t; 10 typedef uint16_t u16_t; 11 typedef int16_t s16_t; 12 typedef uint32_t u32_t; 13 typedef int32_t s32_t; 14 15 typedef u32_t mem_ptr_t; 16 17 #define U16_F "hu" 18 #define S16_F "hd" 19 #define X16_F "hx" 20 #define U32_F "u" 21 #define S32_F "d" 22 #define X32_F "x" 23 24 #define X8_F "02x" 25 #define SZT_F "u" 26 27 #define BYTE_ORDER LITTLE_ENDIAN 28 29 #define LWIP_CHKSUM_ALGORITHM 2 30 31 #include <assert.h> 32 #define LWIP_PLATFORM_DIAG(x) 33 #define LWIP_PLATFORM_ASSERT(x) { assert(1); } 34 35 //#define PACK_STRUCT_FIELD(x) x __attribute__((packed)) 36 #define PACK_STRUCT_FIELD(x) x 37 #define PACK_STRUCT_STRUCT __attribute__((packed)) 38 #define PACK_STRUCT_BEGIN 39 #define PACK_STRUCT_END 40 41 #endif // MICROPY_INCLUDED_EXTMOD_LWIP_INCLUDE_ARCH_CC_H 42