📄 typedef.h
字号:
/*************************************************************************************
* Copyright (c) 2005 by National ASIC System Engineering Research Center.
* PROPRIETARY RIGHTS of ASIC are involved in the subject matter of this
* material. All manufacturing, reproduction, use, and sales rights
* pertaining to this subject matter are governed by the license agreement.
* The recipient of this software implicitly accepts the terms of the license.
*
* File Name: typedef.h
*
* File Description:
* The file define some macro definition used in some assembler file.
*
* Created by Michael <yuyu_zh@seu.edu.cn>, 2005-03-22
**************************************************************************************/
#ifndef TYPEDEF_H
#define TYPEDEF_H
/******************************************
* General-Purpose Data Types
*******************************************/
typedef char S8; /* signed 8-bit integer */
typedef short S16; /* signed 16-bit integer */
typedef long S32; /* signed 32-bit integer */
typedef unsigned char U8; /* unsigned 8-bit integer */
typedef unsigned short U16; /* unsigned 16-bit integer */
typedef unsigned long U32; /* unsigned 32-bit integer */
typedef long STATUS; /* the status of function return value */
typedef volatile U32 * RP;
typedef volatile U16 * RP16;
typedef volatile U8 * RP8;
typedef void *VP; /* pointer to an unpredictable data type */
typedef void (*FP)(); /* program start address */
#ifndef _BOOL_TYPE_
#define _BOOL_TYPE_
typedef int BOOL; /* Boolean value. TRUE (1) or FALSE (0). */
#endif
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 */
/*interrupt resources */
#define INT_RTC 31
#define INT_DMA 30
#define INT_EMI 29
#define INT_GPT 28
#define INT_USB 27
#define INT_SPI 26
#define INT_MMC 25
#define INT_UART0 24
#define INT_UART1 23
#define INT_PWM 22
#define INT_AC97 21
#define INT_LCD 20
#define INT_EXT17 19
#define INT_EXT16 18
#define INT_EXT15 17
#define INT_NONE 16
#define INT_EXT14 15
#define INT_EXT13 14
#define INT_EXT12 13
#define INT_EXT11 12
#define INT_EXT10 11
#define INT_EXT9 10
#define INT_EXT8 9
#define INT_EXT7 8
#define INT_EXT6 7
#define INT_EXT5 6
#define INT_EXT4 5
#define INT_EXT3 4
#define INT_EXT2 3
#define INT_EXT1 2
#define INT_EXT0 1
#define INT_NULL 0
/****************************************
macros for write and read registers
****************************************/
#define write_reg(reg, data) \
*(RP)reg = data
#define read_reg(reg) \
*(RP)reg
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -