cc.h 907 B

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