/******************************************************************************
版权所有：	
文件名称：	rt_types.h
文件版本：	01.01
创建作者：	sunxi
创建日期：	2020-06-18
功能说明：	实时微系统类型头文件
其它说明：
修改记录：
*/
#ifndef _RT_TYPES_H
#define _RT_TYPES_H
/*------------------------------- 头文件 --------------------------------------
*/


/*------------------------------- 宏定义 --------------------------------------
*/


/*------------------------------ 类型结构 -------------------------------------
*/
//#ifndef __KERNEL__
typedef unsigned char           uint8;   /*  8 bits */
typedef unsigned short int      uint16;  /* 16 bits */
typedef unsigned int       		uint32;  /* 32 bits */
typedef unsigned long int       uint64;  /* 64 bits */

typedef signed char             int8;    /*  8 bits */
typedef signed short int        int16;   /* 16 bits */
typedef signed int         		int32;   /* 32 bits */
typedef signed long int         int64;   /* 64 bits */

typedef volatile uint8          vuint8;  /*  8 bits */
typedef volatile uint16         vuint16; /* 16 bits */
typedef volatile uint32         vuint32; /* 32 bits */
typedef volatile uint64         vuint64; /* 32 bits */

typedef unsigned char  		u8;
typedef unsigned short 		u16;
typedef unsigned int  		u32; 
typedef unsigned long long  u64;

typedef signed char  		s8;
typedef signed short 		s16;
typedef signed int   		s32; 
typedef signed long long	s64; 

//#endif //__KERNEL__

//Q16定点数，小数点在bit16后
typedef unsigned long 		qu16;
typedef signed long			qs16;
#define Q16_BASE			(65536)

//Q08定点数，小数点在bit8后
typedef unsigned long 		qu08;
typedef signed long			qs08;
#define Q08_BASE			(256)

//短整型复数的实部虚部对
struct ri_s16
{
	s16 r;
	s16 i;
};

//长整型复数的实部虚部对
struct ri_s32
{
	s32 r;
	s32 i;
};

typedef union BYTESHORT {
	unsigned short ss;
	unsigned char  tt[2];
}Byte2WORD;

#ifndef bool
#define bool int
#endif
#ifndef true
#define true 1
#endif
#ifndef false
#define false 0
#endif

#ifndef NULL
	#define NULL 			0L
#endif

#define fp32 float

typedef int (*INIT_FUNC)(void);

struct init_t
{
	INIT_FUNC 	func;
	u32			err_code;
};

struct init_t_1
{
	INIT_FUNC 	func;
	char		init_name[32];
	u32			err_code;
};


/*------------------------------ 函数声明 -------------------------------------
*/

						
#endif //_RT_TYPES_H

/*------------------------------ 文件结束 -------------------------------------
*/

