first commit
This commit is contained in:
35
port/arch/cc.h
Normal file
35
port/arch/cc.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#ifndef LWIP_ARCH_CC_H
|
||||
#define LWIP_ARCH_CC_H
|
||||
|
||||
#include <ch32fun.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
|
||||
#define LWIP_PLATFORM_DIAG(x) \
|
||||
do { \
|
||||
printf x; \
|
||||
} while (0)
|
||||
|
||||
#define LWIP_PLATFORM_ASSERT(x) \
|
||||
do { \
|
||||
printf("Assertion \"%s\" failed at line %d in %s\n", x, __LINE__, \
|
||||
__FILE__); \
|
||||
while (1); \
|
||||
} while (0)
|
||||
|
||||
#define X8_F "02x"
|
||||
#define U16_F "u"
|
||||
#define S16_F "d"
|
||||
#define X16_F "x"
|
||||
#define U32_F "u"
|
||||
#define S32_F "d"
|
||||
#define X32_F "x"
|
||||
#define SZT_F "u"
|
||||
|
||||
#define LWIP_RAND() ((u32_t)rand())
|
||||
|
||||
#endif /* LWIP_ARCH_CC_H */
|
||||
Reference in New Issue
Block a user