40 lines
756 B
C
40 lines
756 B
C
#ifndef LWIP_HDR_CC_H
|
|
#define LWIP_HDR_CC_H
|
|
|
|
#include <stdint.h>
|
|
#include <stddef.h>
|
|
|
|
// 1. Basic Types
|
|
typedef uint8_t u8_t;
|
|
typedef int8_t s8_t;
|
|
typedef uint16_t u16_t;
|
|
typedef int16_t s16_t;
|
|
typedef uint32_t u32_t;
|
|
typedef int32_t s32_t;
|
|
typedef uintptr_t mem_ptr_t;
|
|
typedef int sys_prot_t;
|
|
|
|
// 2. Format specifiers
|
|
#define U16_F "hu"
|
|
#define S16_F "hd"
|
|
#define X16_F "hx"
|
|
#define U32_F "u"
|
|
#define S32_F "d"
|
|
#define X32_F "x"
|
|
#define X8_F "02x"
|
|
#define SZT_F "zu"
|
|
|
|
// 3. Byte order
|
|
#define BYTE_ORDER LITTLE_ENDIAN
|
|
|
|
// 4. Compiler hints
|
|
#define PACK_STRUCT_BEGIN
|
|
#define PACK_STRUCT_END
|
|
#define PACK_STRUCT_STRUCT __attribute__((packed))
|
|
#define PACK_STRUCT_FIELD(x) x
|
|
|
|
// 5. Diagnostics
|
|
void printf(const char *format, ...);
|
|
|
|
#endif
|