From 67ca69985af9109a0603a1cde71f21b940c059ff Mon Sep 17 00:00:00 2001 From: chen <15335560115@163.com> Date: 星期四, 15 五月 2025 09:12:53 +0800 Subject: [PATCH] 完全将免布线标签代码移植过来版本 --- keil/include/components/hido/Include/HIDO_TypeDef.h | 73 ++++++++++++++++++++++++++++++++++++ 1 files changed, 73 insertions(+), 0 deletions(-) diff --git a/keil/include/components/hido/Include/HIDO_TypeDef.h b/keil/include/components/hido/Include/HIDO_TypeDef.h new file mode 100644 index 0000000..4049e4d --- /dev/null +++ b/keil/include/components/hido/Include/HIDO_TypeDef.h @@ -0,0 +1,73 @@ +/******************************************************************************* + * File Name : HIDO_TypeDef.h + * Description : + * Created on : 2018年6月4日 + * Author : www.hido-studio.com + *******************************************************************************/ + +#ifndef HIDO_TYPEDEF_H_ +#define HIDO_TYPEDEF_H_ +/******************************************************************************* + * Include Files * + *******************************************************************************/ +#include "HIDO_TypeDef.h" + +/******************************************************************************* + * Macro * + *******************************************************************************/ +#ifndef NULL +#define NULL 0 +#endif + +#ifndef HIDO_NULL +#define HIDO_NULL 0 +#endif + +#define HIDO_OK 0 /* 正常返回 */ +#define HIDO_ERR -1 /* 出错返回,没有明确具体出错原因的返回 */ + +#define HIDO_OFFSET_OF(type, member) ((HIDO_UINT32) &((type *)0)->member) +#define HIDO_ARRARY_COUNT(arrary) (sizeof(arrary)/sizeof((arrary)[0])) + +#define HIDO_ASSERT(bool) while(!(bool)){} + +/******************************************************************************* + * Type Definition * + *******************************************************************************/ +typedef void HIDO_VOID; /* 前缀无 */ +typedef unsigned char HIDO_UINT8; /* 前缀u8 */ +typedef unsigned short HIDO_UINT16; /* 前缀u16 */ +typedef unsigned int HIDO_UINT32; /* 前缀u32 */ +typedef unsigned long long HIDO_UINT64; /* 前缀u64 */ +typedef signed char HIDO_INT8; /* 前缀i8 */ +typedef signed short HIDO_INT16; /* 前缀i16 */ +typedef signed int HIDO_INT32; /* 前缀i32 */ +typedef signed long long HIDO_INT64; /* 前缀i64 */ +typedef char HIDO_CHAR; /* 前缀c */ +typedef float HIDO_FLOAT; /* 前缀f */ +typedef double HIDO_DOUBLE; /* 前缀d */ + +typedef enum { HIDO_FALSE, HIDO_TRUE } HIDO_BOOL; /* 前缀b */ + +typedef struct +{ + HIDO_VOID *m_pData; + HIDO_UINT32 m_u32Len; +}HIDO_DataStruct; + +typedef struct +{ + HIDO_UINT32 m_u32Size; + HIDO_UINT32 m_u32Len; + HIDO_UINT8 *m_pu8Data; +}HIDO_ByteArraryStruct; + +#define HIDO_DEFINE_BYTE_ARRARY(name, size) \ +HIDO_UINT8 (__##name##Buffer)[(size)]; \ +HIDO_ByteArraryStruct (name) = { (size), 0, __##name##Buffer } + +/******************************************************************************* + * Global Function * + *******************************************************************************/ + +#endif /* HIDO_TYPEDEF_H_ */ -- Gitblit v1.9.3