📄 lpc2468.h
字号:
/******************************************************************************
* LPC2468.h: Header file for NXP LPC2468 Family Microprocessors
* The header file is the super set of all hardware definition of the
* peripherals for the LPC2468 family microprocessor.
*
* Copyright(C) 2006, NXP Semiconductor
* All rights reserved.
*
* History
* 2005.10.01 ver 1.00 Prelimnary version, first Release
*
******************************************************************************/
#ifndef __LPC2468_H
#define __LPC2468_H
/* 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 LPC24xx,
these registers are known as "VICVectPriority(x)". */
#define VICVectCntl0 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x200))
#define VICVectCntl1 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x204))
#define VICVectCntl2 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x208))
#define VICVectCntl3 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x20C))
#define VICVectCntl4 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x210))
#define VICVectCntl5 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x214))
#define VICVectCntl6 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x218))
#define VICVectCntl7 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x21C))
#define VICVectCntl8 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x220))
#define VICVectCntl9 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x224))
#define VICVectCntl10 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x228))
#define VICVectCntl11 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x22C))
#define VICVectCntl12 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x230))
#define VICVectCntl13 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x234))
#define VICVectCntl14 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x238))
#define VICVectCntl15 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x23C))
#define VICVectCntl16 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x240))
#define VICVectCntl17 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x244))
#define VICVectCntl18 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x248))
#define VICVectCntl19 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x24C))
#define VICVectCntl20 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x250))
#define VICVectCntl21 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x254))
#define VICVectCntl22 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x258))
#define VICVectCntl23 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x25C))
#define VICVectCntl24 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x260))
#define VICVectCntl25 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x264))
#define VICVectCntl26 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x268))
#define VICVectCntl27 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x26C))
#define VICVectCntl28 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x270))
#define VICVectCntl29 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x274))
#define VICVectCntl30 (*(volatile unsigned long *)(VIC_BASE_ADDR + 0x278))
#define VICVectCntl31 (*(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 IOPIN0 (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0x00))
#define IOSET0 (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0x04))
#define IODIR0 (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0x08))
#define IOCLR0 (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0x0C))
#define IOPIN1 (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0x10))
#define IOSET1 (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0x14))
#define IODIR1 (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0x18))
#define IOCLR1 (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0x1C))
/* GPIO Interrupt Registers */
#define IO0_INT_EN_R (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0x90))
#define IO0_INT_EN_F (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0x94))
#define IO0_INT_STAT_R (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0x84))
#define IO0_INT_STAT_F (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0x88))
#define IO0_INT_CLR (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0x8C))
#define IO2_INT_EN_R (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0xB0))
#define IO2_INT_EN_F (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0xB4))
#define IO2_INT_STAT_R (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0xA4))
#define IO2_INT_STAT_F (*(volatile unsigned long *)(GPIO_BASE_ADDR + 0xA8))
#define IO2_INT_CLR (*(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 + 0x01))
#define FIO1DIR0 (*(volatile unsigned char *)(FIO_BASE_ADDR + 0x21))
#define FIO2DIR0 (*(volatile unsigned char *)(FIO_BASE_ADDR + 0x41))
#define FIO3DIR0 (*(volatile unsigned char *)(FIO_BASE_ADDR + 0x61))
#define FIO4DIR0 (*(volatile unsigned char *)(FIO_BASE_ADDR + 0x81))
#define FIO0DIR1 (*(volatile unsigned char *)(FIO_BASE_ADDR + 0x02))
#define FIO1DIR1 (*(volatile unsigned char *)(FIO_BASE_ADDR + 0x22))
#define FIO2DIR1 (*(volatile unsigned char *)(FIO_BASE_ADDR + 0x42))
#define FIO3DIR1 (*(volatile unsigned char *)(FIO_BASE_ADDR + 0x62))
#define FIO4DIR1 (*(volatile unsigned char *)(FIO_BASE_ADDR + 0x82))
#define FIO0DIR2 (*(volatile unsigned char *)(FIO_BASE_ADDR + 0x03))
#define FIO1DIR2 (*(volatile unsigned char *)(FIO_BASE_ADDR + 0x23))
#define FIO2DIR2 (*(volatile unsigned char *)(FIO_BASE_ADDR + 0x43))
#define FIO3DIR2 (*(volatile unsigned char *)(FIO_BASE_ADDR + 0x63))
#define FIO4DIR2 (*(volatile unsigned char *)(FIO_BASE_ADDR + 0x83))
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -