⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 basic_type.h

📁 lab windows uart driver
💻 H
字号:
/*******************************************************************************
*  COPYRIGHT DaTang Mobile Communications Equipment CO.,LTD					   *
********************************************************************************
* Filename	 : basic_type.h													
*
* Description: this file is to define all basic types and some common types/macros
*
* Notes		:                                        
*
*--------------------------------------------------------------------------------
* Change History: 
*--------------------------------------------------------------------------------
*          
*  0.01 	2004-12-16 	fangjiayuan 	Original          
*  0.02 	2004-12-27 	fangjiayuan 	add micro of timer state          
*  0.03     2005-01-31  weiwu           Adjust float definition
*  0.04     2005-0301   weiwu           define BOOL int      
********************************************************************************/
#ifndef OS_TYPE_H
#define OS_TYPE_H

/*------------------------------ head file declaration-------------------------*/
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h> 
#include <string.h>
#include <time.h>

/*-------------------------- extern variable declaration-----------------------*/

/*--------------------------- variable declaration ----------------------------*/

/*-------------------- constants and data type declaration ---------------------*/
typedef char CHAR;
typedef signed char SINT8;
typedef signed short int SINT16;
typedef signed long int SINT32;
typedef unsigned char UINT8;
typedef unsigned short int UINT16;
typedef unsigned long int USINT32;
//typedef void VOID; 
typedef float FLOAT32;
typedef double FLOAT64;

/*consant definitions*/
#ifndef BOOL
#define BOOL int

#ifndef TRUE
#define TRUE (BOOL)1
#endif
#ifndef FALSE
#define FALSE (BOOL)0
#endif

#endif

/*-----------macro declaration-------------------------------------*/
/*enum type redefinition*/
#define ENUM enum

/*union type redefinition*/
#define UNION union

/*const qualify keyword*/
#define CONST const

/*static -- qualifid macro definition*/
#ifdef DEBUG_SWITCH
#define STATIC
#else
#define STATIC static
#endif

/*inline -- qualified macro definition*/
#ifdef DEBUG_SWITCH 
#define INLINE 
#else /*#ifdef DEBUG_SWITCH*/
#define INLINE 
#endif

/*null pointer*/
#define NULLPTR (void *)0
#define OS_NULLPTR (void *)0

typedef USINT32 OS_STATUS;
/*the data type of os_open return*/
typedef SINT32 OS_FD;

typedef void (*OS_THREAD_ENTRY)(void* param);
typedef void (*OS_FUNC_ENTRY)(void* param);

typedef USINT32 OS_EVENT_ID;
typedef USINT32 OS_MUTEX_ID;
typedef USINT32 OS_QUEUE_ID;
typedef USINT32 OS_SEMA_ID;
typedef USINT32 OS_THREAD_ID;
typedef USINT32 OS_TIMER_ID;

#define OS_MAX_NAME_LEN 4

/* API input parameters and general constants.  */
#define OS_NO_WAIT          0x00000000
#define OS_WAIT_FOREVER     0xffffffff
#define OS_AUTO_ACTIVATE    0x1
#define OS_DONT_ACTIVATE    0x0
#define OS_AUTO_LOAD        0x2
#define OS_DONT_LOAD        0x0
#define OS_TRUE             1
#define OS_FALSE            0

#define OS_AVAILABLE        1
#define OS_UNAVAILABLE      0


/*the macro created to define the state of timer*/
#define OS_TIMER_ACTIVE 1
#define OS_TIMER_STOP 0


/* API return values.  */
#define OS_SUCCESS          0x00000000
#define OS_FAILURE          0xffffffff

/*--------------------------- variable declaration ----------------------------*/

/*------------------------------ function prototype ---------------------------*/

#endif /*OS_TYPE_H*/
/*------------------------------ End of file----------------------------------*/


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -