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

📄 def3203.h

📁 SEP3203_DTU
💻 H
字号:
/**************************************************************************
*                                                                         *
*   PROJECT     : ARM port for UCOS-II                                    *
*                                                                         *
*   MODULE      : DEF3203.h                                                   *
*                                                                         *
*   AUTHOR      : Michael Anburaj                                         *
*                 URL  : http://geocities.com/michaelanburaj/             *
*                 EMAIL: michaelanburaj@hotmail.com                       *
*                                                                         *
*   PROCESSOR   : Any Processor                                           *
*                                                                         *
*   IDE         : Any IDE                                                 *
*                                                                         *
*   DESCRIPTION :                                                         *
*   Common data type definition header file.                              *
*                                                                         *
**************************************************************************/


#ifndef __DEF3203_H__
#define __DEF3203_H__

#ifdef __cplusplus
extern "C" {
#endif


/* ********************************************************************* */
/* Module configuration */
//#define	ARMulator	/* when using ARMulator as debug, define it */

/* ********************************************************************* */
/* Interface macro & data definition */

#define U32 unsigned int
#define U16 unsigned short
#define S32 int
#define S16 short int
#define U8  unsigned char
#define S8  signed char
#define	RP	volatile unsigned int *


#ifndef USER_FILETYPE
#define USER_FILETYPE

#define uint8    U8                    /* Unsigned  8 bit quantity                           */
#define int8     S8                    /* Signed    8 bit quantity                           */
#define uint16   U16                   /* Unsigned 16 bit quantity                           */
#define int16    S16                   /* Signed   16 bit quantity                           */
#define uint32   U32                   /* Unsigned 32 bit quantity                           */
#define int32    S32                   /* Signed   32 bit quantity                           */

#endif

#define False 0
#define True !False

/* Sets the result on bPort */
#define BIT_SET(bPort,bBitMask)        (bPort |= bBitMask)
#define BIT_CLR(bPort,bBitMask)        (bPort &= ~bBitMask)

/* Returns the result */
#define GET_BIT_SET(bPort,bBitMask)    (bPort | bBitMask)
#define GET_BIT_CLR(bPort,bBitMask)    (bPort & ~bBitMask)

/* Returns 0 if the condition is False & a non-zero value if it is True */
#define TEST_BIT_SET(bPort,bBitMask)   (bPort & bBitMask)
#define TEST_BIT_CLR(bPort,bBitMask)   ((~bPort) & bBitMask)

/* ARM modes */
#define USERMODE        0x10
#define FIQMODE         0x11
#define IRQMODE         0x12
#define SVCMODE         0x13
#define ABORTMODE       0x17
#define UNDEFMODE       0x1b
#define MODEMASK        0x1f
#define NOINT           0xc0

typedef int					ER;			/* Error code.  A signed integer. */

/*******************************************************************
*  Error Codes               
*           IF SUCCESS RETURN 0, ELSE RETURN OTHER ERROR CODE,
*           parameter error return (-33)/E_PAR, hardware error reture (-99)/E_HA
********************************************************************/
#define 	E_OK       	0        /* Normal completion */
#define 	E_SYS      	(-5)     /* System error */
#define 	E_NOMEM    	(-10)    /* Insufficient memory */
#define 	E_NOSPT    	(-17)    /* Feature not supported */
#define 	E_INOSPT  	 (-18)   /* Feature not supported 
                               		by ITRON/FILE specification */
#define 	E_RSFN     	(-20)    /* Reserved function code number */
#define 	E_RSATR    	(-24)    /* Reserved attribute */
#define 	E_PAR      	(-33)    /* Parameter error */
#define 	E_ID       	(-35)    /* Invalid ID number */
#define 	E_NOEXS    	(-52)    /* Object does not exist */
#define 	E_OBJ      	(-63)    /* Invalid object state */
#define 	E_MACV     	(-65)    /* Memory access disabled or memory access 
                               		violation */
#define 	E_OACV     	(-66)    /* Object access violation */
#define 	E_CTX      	(-69)    /* Context error */
#define 	E_QOVR     	(-73)    /* Queuing or nesting overflow */
#define 	E_DLT      	(-81)    /* Object being waited for was deleted */
#define 	E_TMOUT    	(-85)    /* Polling failure or timeout exceeded */
#define 	E_RLWAI    	(-86)    /* WAIT state was forcibly released */ 

#define		E_HA		(-99) 		 /* HARD WARE ERROR */

/* ********************************************************************* */
/* Interface function definition */


/* ********************************************************************* */

#ifdef __cplusplus
}
#endif

#endif /*__DEF_H__*/

⌨️ 快捷键说明

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