📄 ma_tgt.h
字号:
/*
*****************************************************************************
**
** Project : My project
**
** Component : LPC2106 (LPC2106)
**
** Modulename : System
**
** Filename : ma_tgt.h
**
** Abstract : This file includes IAR MakeApp target definitions
**
** Date : 2004-05-26 17:21:26
**
** License no. : 9503-663-863-6224 Ivan
**
** Warning : This file has been automatically generated.
** Do not edit this file if you intend to regenerate it.
**
** This header file was created by IAR MakeApp version
** 4.02A (NXP LPC210x: 4.00C) for the NXP LPC210x series of
** microcontrollers.
**
** (c)Copyright 2004 IAR Systems.
** Your rights to this file are explained in the IAR MakeApp
** License Agreement. All other rights reserved.
**
*****************************************************************************
*/
/*
**===========================================================================
** 1 GENERAL
** 1.1 Revisions
**
** Please read the IAR MakeApp for the NXP LPC210x readme file
**
**
**===========================================================================
*/
/*
**===========================================================================
** 1.2 References
**
** No Identification Name or Description
** == =================== ================================
**
** 1 02/Oct/2003 NXP LPC210x Hardware Manual
**
**===========================================================================
*/
/*
**===========================================================================
** 1.3 Re-definition guard
**===========================================================================
*/
/*--- Avoid including this file more than once ---*/
#ifndef _IS_INCLUDED_MA_TGT_H
#define _IS_INCLUDED_MA_TGT_H
/*
**===========================================================================
** 2. INCLUDE FILES
** 2.1 Standard include files
**===========================================================================
*/
/*
**===========================================================================
** 2.2 Application include files
**===========================================================================
*/
#include "ma_tgt.h" /* Target specific header file */
/*
**===========================================================================
** 3. DECLARATIONS
** 3.1 Global constants
**===========================================================================
*/
/*--- TRUE / FALSE / NULL ---*/
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef NULL
#define NULL 0
#endif
/*--- Return codes ---*/
#define MA_OK 1
#define MA_DATA 2
#define MA_RTR 3
#define MA_ERROR -1
#define MA_FULL -2
#define MA_EMPTY -3
#define MA_BUSY -4
#define ENABLE_BIT_DEFINITIONS
/***************************************************************************
**
** Interrupt vector table
**
***************************************************************************/
#define RESETV 0x00 /* Reset */
#define UNDEFV 0x04 /* Undefined instruction */
#define SWIV 0x08 /* Software interrupt */
#define PABORTV 0x0c /* Prefetch abort */
#define DABORTV 0x10 /* Data abort */
#define IRQV 0x18 /* Normal interrupt */
#define FIQV 0x1c /* Fast interrupt */
/***************************************************************************
**
** VIC Interrupt channels
**
***************************************************************************/
#define VIC_WDT 0 /* Watchdog */
#define VIC_SW 1 /* Software interrupts */
#define VIC_DEBUGRX 2 /* Embedded ICE, DbgCommRx */
#define VIC_DEBUGTX 3 /* Embedded ICE, DbgCommTx */
#define VIC_TIMER0 4 /* Timer 0 (Match 0-3 Capture 0-3) */
#define VIC_TIMER1 5 /* Timer 1 (Match 0-3 Capture 0-3) */
#define VIC_UART0 6 /* UART 0 (RLS, THRE, RDA, CTI) */
#define VIC_UART1 7 /* UART 1 (RLS, THRE, RDA, CTI, MSI) */
#define VIC_PWM0 8 /* PWM 0 (Match 0-6 Capture 0-3) */
#define VIC_I2C 9 /* I2C (SI) */
#define VIC_SPI 10 /* SPI (SPIF, MODF) */
//#define VIC_RES 11 /* Reserved */
#define VIC_PLL 12 /* PLL lock (PLOCK) */
#define VIC_RTC 13 /* RTC (RTCCIF, RTCALF) */
#define VIC_EINT0 14 /* External interrupt 0 (EINT0) */
#define VIC_EINT1 15 /* External interrupt 1 (EINT1) */
#define VIC_EINT2 16 /* External interrupt 2 (EINT2) */
/*
**===========================================================================
** 3.3 Global type definitions
**===========================================================================
*/
#define C8 char
#define U8 unsigned char
#define U16 unsigned short
#define U32 unsigned long
#define S8 signed char
#define S16 signed short
#define S32 signed long
#define Reg_Type unsigned char
#ifndef EOF
#define EOF (int)(-1)
#endif
/*
**===========================================================================
** 3.2 Global macros
**===========================================================================
*/
/*--- Bit manipulation macros ---*/
#define __BIT_MASK(A) (1<<(A))
#define SetBit( SFR, MASK ) (SFR) |= (MASK)
#define ClrBit( SFR, MASK ) (SFR) &= ~(MASK)
#define Min(a,b) ((a) < (b) ? (a) : (b))
#define Max(a,b) ((a) > (b) ? (a) : (b))
/*--- I/O reg. bit manipulating macros ----*/
#define SetRegBit(Register, Bit) \
Register |= Register##_##Bit
#define ClrRegBit(Register, Bit) \
Register &= ~(Register##_##Bit)
#define ReadRegBit(Register, Bit) \
(Reg_Type)(Register & Register##_##Bit)
#define WriteRegBit(Register, Bit, Value) \
Register &= ~(Register##_##Bit & ~Value); \
Register |= Value;
/*
**===========================================================================
** 3.4 Global variables (defined in some implementation file)
**===========================================================================
*/
/*
**===========================================================================
** 4. GLOBAL FUNCTIONS (defined in some implementation file)
**===========================================================================
*/
#endif /* Match the re-definition guard */
/*
**===========================================================================
** END OF FILE
**===========================================================================
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -