?? lpc23xx.h
字號:
/****************************************Copyright (c)**************************************************
** Guangzhou ZHIYUAN electronics Co.,LTD.
**
** http://www.embedtools.com
**
**--------------文件信息--------------------------------------------------------------------------------
**文 件 名: LPC23XX.H
**創 建 人: 張日進
**最后修改日期: 2007-01-09
**描 述: lpc23xx芯片的頭文件
**
**--------------歷史版本信息----------------------------------------------------------------------------
** 創建人: 張日進
** 版 本: V1.0
** 日 期: 2007-01-09
** 描 述: lpc23xx芯片的頭文件
**
**--------------當前版本修訂------------------------------------------------------------------------------
** 修改人:
** 日 期:
** 描 述:
**
**------------------------------------------------------------------------------------------------------
********************************************************************************************************/
/* Vectored Interrupt Controller (VIC) */
#define VIC_BASE_ADDR 0xFFFFF000
#define VICIRQStatus (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x000))
#define VICFIQStatus (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x004))
#define VICRawIntr (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x008))
#define VICIntSelect (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x00C))
#define VICIntEnable (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x010))
#define VICIntEnClr (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x014))
#define VICSoftInt (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x018))
#define VICSoftIntClr (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x01C))
#define VICProtection (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x020))
#define VICSWPrioMask (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x024))
#define VICVectAddr0 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x100))
#define VICVectAddr1 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x104))
#define VICVectAddr2 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x108))
#define VICVectAddr3 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x10C))
#define VICVectAddr4 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x110))
#define VICVectAddr5 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x114))
#define VICVectAddr6 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x118))
#define VICVectAddr7 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x11C))
#define VICVectAddr8 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x120))
#define VICVectAddr9 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x124))
#define VICVectAddr10 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x128))
#define VICVectAddr11 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x12C))
#define VICVectAddr12 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x130))
#define VICVectAddr13 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x134))
#define VICVectAddr14 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x138))
#define VICVectAddr15 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x13C))
#define VICVectAddr16 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x140))
#define VICVectAddr17 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x144))
#define VICVectAddr18 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x148))
#define VICVectAddr19 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x14C))
#define VICVectAddr20 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x150))
#define VICVectAddr21 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x154))
#define VICVectAddr22 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x158))
#define VICVectAddr23 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x15C))
#define VICVectAddr24 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x160))
#define VICVectAddr25 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x164))
#define VICVectAddr26 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x168))
#define VICVectAddr27 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x16C))
#define VICVectAddr28 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x170))
#define VICVectAddr29 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x174))
#define VICVectAddr30 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x178))
#define VICVectAddr31 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x17C))
/* The name convention below is from previous LPC2000 family MCUs, in LPC230x,
these registers are known as "VICVectPriority(x)". */
#define VICVectPri0 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x200))
#define VICVectPri1 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x204))
#define VICVectPri2 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x208))
#define VICVectPri3 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x20C))
#define VICVectPri4 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x210))
#define VICVectPri5 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x214))
#define VICVectPri6 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x218))
#define VICVectPri7 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x21C))
#define VICVectPri8 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x220))
#define VICVectPri9 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x224))
#define VICVectPri10 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x228))
#define VICVectPri11 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x22C))
#define VICVectPri12 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x230))
#define VICVectPri13 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x234))
#define VICVectPri14 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x238))
#define VICVectPri15 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x23C))
#define VICVectPri16 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x240))
#define VICVectPri17 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x244))
#define VICVectPri18 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x248))
#define VICVectPri19 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x24C))
#define VICVectPri20 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x250))
#define VICVectPri21 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x254))
#define VICVectPri22 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x258))
#define VICVectPri23 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x25C))
#define VICVectPri24 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x260))
#define VICVectPri25 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x264))
#define VICVectPri26 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x268))
#define VICVectPri27 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x26C))
#define VICVectPri28 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x270))
#define VICVectPri29 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x274))
#define VICVectPri30 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x278))
#define VICVectPri31 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x27C))
#define VICVectAddr (*(volatile unsigned long *)(VIC_BASE_ADDR + 0xF00))
/* Pin Connect Block */
#define PINSEL_BASE_ADDR 0xE002C000
#define PINSEL0 (*(volatile unsigned long *)(PINSEL_BASE_ADDR + 0x00))
#define PINSEL1 (*(volatile unsigned long *)(PINSEL_BASE_ADDR + 0x04))
#define PINSEL2 (*(volatile unsigned long *)(PINSEL_BASE_ADDR + 0x08))
#define PINSEL3 (*(volatile unsigned long *)(PINSEL_BASE_ADDR + 0x0C))
#define PINSEL4 (*(volatile unsigned long *)(PINSEL_BASE_ADDR + 0x10))
#define PINSEL5 (*(volatile unsigned long *)(PINSEL_BASE_ADDR + 0x14))
#define PINSEL6 (*(volatile unsigned long *)(PINSEL_BASE_ADDR + 0x18))
#define PINSEL7 (*(volatile unsigned long *)(PINSEL_BASE_ADDR + 0x1C))
#define PINSEL8 (*(volatile unsigned long *)(PINSEL_BASE_ADDR + 0x20))
#define PINSEL9 (*(volatile unsigned long *)(PINSEL_BASE_ADDR + 0x24))
#define PINSEL10 (*(volatile unsigned long *)(PINSEL_BASE_ADDR + 0x28))
#define PINMODE0 (*(volatile unsigned long *)(PINSEL_BASE_ADDR + 0x40))
#define PINMODE1 (*(volatile unsigned long *)(PINSEL_BASE_ADDR + 0x44))
#define PINMODE2 (*(volatile unsigned long *)(PINSEL_BASE_ADDR + 0x48))
#define PINMODE3 (*(volatile unsigned long *)(PINSEL_BASE_ADDR + 0x4C))
#define PINMODE4 (*(volatile unsigned long *)(PINSEL_BASE_ADDR + 0x50))
#define PINMODE5 (*(volatile unsigned long *)(PINSEL_BASE_ADDR + 0x54))
#define PINMODE6 (*(volatile unsigned long *)(PINSEL_BASE_ADDR + 0x58))
#define PINMODE7 (*(volatile unsigned long *)(PINSEL_BASE_ADDR + 0x5C))
#define PINMODE8 (*(volatile unsigned long *)(PINSEL_BASE_ADDR + 0x60))
#define PINMODE9 (*(volatile unsigned long *)(PINSEL_BASE_ADDR + 0x64))
/* General Purpose Input/Output (GPIO) */
#define GPIO_BASE_ADDR 0xE0028000
#define IO0PIN (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0x00))
#define IO0SET (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0x04))
#define IO0DIR (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0x08))
#define IO0CLR (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0x0C))
#define IO1PIN (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0x10))
#define IO1SET (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0x14))
#define IO1DIR (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0x18))
#define IO1CLR (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0x1C))
/* GPIO Interrupt Registers */
#define IO0IntEnR (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0x90))
#define IO0IntEnF (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0x94))
#define IO0IntStatR (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0x84))
#define IO0IntStatF (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0x88))
#define IO0IntClr (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0x8C))
#define IO2IntEnR (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0xB0))
#define IO2IntEnF (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0xB4))
#define IO2IntStatR (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0xA4))
#define IO2IntStatF (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0xA8))
#define IO2IntClr (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0xAC))
#define IO_INT_STAT (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0x80))
#define PARTCFG_BASE_ADDR 0x3FFF8000
#define PARTCFG (*(volatile unsigned long *)(PARTCFG_BASE_ADDR + 0x00))
/* Fast I/O setup */
#define FIO_BASE_ADDR 0x3FFFC000
#define FIO0DIR (*(volatile unsigned long *)(FIO_BASE_ADDR + 0x00))
#define FIO0MASK (*(volatile unsigned long *)(FIO_BASE_ADDR + 0x10))
#define FIO0PIN (*(volatile unsigned long *)(FIO_BASE_ADDR + 0x14))
#define FIO0SET (*(volatile unsigned long *)(FIO_BASE_ADDR + 0x18))
#define FIO0CLR (*(volatile unsigned long *)(FIO_BASE_ADDR + 0x1C))
#define FIO1DIR (*(volatile unsigned long *)(FIO_BASE_ADDR + 0x20))
#define FIO1MASK (*(volatile unsigned long *)(FIO_BASE_ADDR + 0x30))
#define FIO1PIN (*(volatile unsigned long *)(FIO_BASE_ADDR + 0x34))
#define FIO1SET (*(volatile unsigned long *)(FIO_BASE_ADDR + 0x38))
#define FIO1CLR (*(volatile unsigned long *)(FIO_BASE_ADDR + 0x3C))
#define FIO2DIR (*(volatile unsigned long *)(FIO_BASE_ADDR + 0x40))
#define FIO2MASK (*(volatile unsigned long *)(FIO_BASE_ADDR + 0x50))
#define FIO2PIN (*(volatile unsigned long *)(FIO_BASE_ADDR + 0x54))
#define FIO2SET (*(volatile unsigned long *)(FIO_BASE_ADDR + 0x58))
#define FIO2CLR (*(volatile unsigned long *)(FIO_BASE_ADDR + 0x5C))
#define FIO3DIR (*(volatile unsigned long *)(FIO_BASE_ADDR + 0x60))
#define FIO3MASK (*(volatile unsigned long *)(FIO_BASE_ADDR + 0x70))
#define FIO3PIN (*(volatile unsigned long *)(FIO_BASE_ADDR + 0x74))
#define FIO3SET (*(volatile unsigned long *)(FIO_BASE_ADDR + 0x78))
#define FIO3CLR (*(volatile unsigned long *)(FIO_BASE_ADDR + 0x7C))
#define FIO4DIR (*(volatile unsigned long *)(FIO_BASE_ADDR + 0x80))
#define FIO4MASK (*(volatile unsigned long *)(FIO_BASE_ADDR + 0x90))
#define FIO4PIN (*(volatile unsigned long *)(FIO_BASE_ADDR + 0x94))
#define FIO4SET (*(volatile unsigned long *)(FIO_BASE_ADDR + 0x98))
#define FIO4CLR (*(volatile unsigned long *)(FIO_BASE_ADDR + 0x9C))
/* FIOs can be accessed through WORD, HALF-WORD or BYTE. */
#define FIO0DIR0 (*(volatile unsigned char *)(FIO_BASE_ADDR + 0x00))
#define FIO1DIR0 (*(volatile unsigned char *)(FIO_BASE_ADDR + 0x20))
#define FIO2DIR0 (*(volatile unsigned char *)(FIO_BASE_ADDR + 0x40))
#define FIO3DIR0 (*(volatile unsigned char *)(FIO_BASE_ADDR + 0x60))
#define FIO4DIR0 (*(volatile unsigned char *)(FIO_BASE_ADDR + 0x80))
#define FIO0DIR1 (*(volatile unsigned char *)(FIO_BASE_ADDR + 0x01))
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -