/* LPC2300 peripheral registers */
#ifndef __LPC2300
#define __LPC2300
#include "integer.h"

#define VICIRQStatus	(*(volatile DWORD*)(0xFFFFF000))
#define VICFIQStatus	(*(volatile DWORD*)(0xFFFFF004))
#define VICRawIntr		(*(volatile DWORD*)(0xFFFFF008))
#define VICIntSelect	(*(volatile DWORD*)(0xFFFFF00C))
#define VICIntEnable	(*(volatile DWORD*)(0xFFFFF010))
#define VICIntEnClr		(*(volatile DWORD*)(0xFFFFF014))
#define VICSoftInt		(*(volatile DWORD*)(0xFFFFF018))
#define VICSoftIntClr	(*(volatile DWORD*)(0xFFFFF01C))
#define VICProtection	(*(volatile DWORD*)(0xFFFFF020))
#define VICSWPrioMask	(*(volatile DWORD*)(0xFFFFF024))
#define VICVectAddr0	(*(volatile DWORD*)(0xFFFFF100))
#define VICVectAddr1	(*(volatile DWORD*)(0xFFFFF104))
#define VICVectAddr2	(*(volatile DWORD*)(0xFFFFF108))
#define VICVectAddr3	(*(volatile DWORD*)(0xFFFFF10C))
#define VICVectAddr4	(*(volatile DWORD*)(0xFFFFF110))
#define VICVectAddr5	(*(volatile DWORD*)(0xFFFFF114))
#define VICVectAddr6	(*(volatile DWORD*)(0xFFFFF118))
#define VICVectAddr7	(*(volatile DWORD*)(0xFFFFF11C))
#define VICVectAddr8	(*(volatile DWORD*)(0xFFFFF120))
#define VICVectAddr9	(*(volatile DWORD*)(0xFFFFF124))
#define VICVectAddr10	(*(volatile DWORD*)(0xFFFFF128))
#define VICVectAddr11	(*(volatile DWORD*)(0xFFFFF12C))
#define VICVectAddr12	(*(volatile DWORD*)(0xFFFFF130))
#define VICVectAddr13	(*(volatile DWORD*)(0xFFFFF134))
#define VICVectAddr14	(*(volatile DWORD*)(0xFFFFF138))
#define VICVectAddr15	(*(volatile DWORD*)(0xFFFFF13C))
#define VICVectAddr16	(*(volatile DWORD*)(0xFFFFF140))
#define VICVectAddr17	(*(volatile DWORD*)(0xFFFFF144))
#define VICVectAddr18	(*(volatile DWORD*)(0xFFFFF148))
#define VICVectAddr19	(*(volatile DWORD*)(0xFFFFF14C))
#define VICVectAddr20	(*(volatile DWORD*)(0xFFFFF150))
#define VICVectAddr21	(*(volatile DWORD*)(0xFFFFF154))
#define VICVectAddr22	(*(volatile DWORD*)(0xFFFFF158))
#define VICVectAddr23	(*(volatile DWORD*)(0xFFFFF15C))
#define VICVectAddr24	(*(volatile DWORD*)(0xFFFFF160))
#define VICVectAddr25	(*(volatile DWORD*)(0xFFFFF164))
#define VICVectAddr26	(*(volatile DWORD*)(0xFFFFF168))
#define VICVectAddr27	(*(volatile DWORD*)(0xFFFFF16C))
#define VICVectAddr28	(*(volatile DWORD*)(0xFFFFF170))
#define VICVectAddr29	(*(volatile DWORD*)(0xFFFFF174))
#define VICVectAddr30	(*(volatile DWORD*)(0xFFFFF178))
#define VICVectAddr31	(*(volatile DWORD*)(0xFFFFF17C))
#define VICVectCntl0	(*(volatile DWORD*)(0xFFFFF200))
#define VICVectCntl1	(*(volatile DWORD*)(0xFFFFF204))
#define VICVectCntl2	(*(volatile DWORD*)(0xFFFFF208))
#define VICVectCntl3	(*(volatile DWORD*)(0xFFFFF20C))
#define VICVectCntl4	(*(volatile DWORD*)(0xFFFFF210))
#define VICVectCntl5	(*(volatile DWORD*)(0xFFFFF214))
#define VICVectCntl6	(*(volatile DWORD*)(0xFFFFF218))
#define VICVectCntl7	(*(volatile DWORD*)(0xFFFFF21C))
#define VICVectCntl8	(*(volatile DWORD*)(0xFFFFF220))
#define VICVectCntl9	(*(volatile DWORD*)(0xFFFFF224))
#define VICVectCntl10	(*(volatile DWORD*)(0xFFFFF228))
#define VICVectCntl11	(*(volatile DWORD*)(0xFFFFF22C))
#define VICVectCntl12	(*(volatile DWORD*)(0xFFFFF230))
#define VICVectCntl13	(*(volatile DWORD*)(0xFFFFF234))
#define VICVectCntl14	(*(volatile DWORD*)(0xFFFFF238))
#define VICVectCntl15	(*(volatile DWORD*)(0xFFFFF23C))
#define VICVectCntl16	(*(volatile DWORD*)(0xFFFFF240))
#define VICVectCntl17	(*(volatile DWORD*)(0xFFFFF244))
#define VICVectCntl18	(*(volatile DWORD*)(0xFFFFF248))
#define VICVectCntl19	(*(volatile DWORD*)(0xFFFFF24C))
#define VICVectCntl20	(*(volatile DWORD*)(0xFFFFF250))
#define VICVectCntl21	(*(volatile DWORD*)(0xFFFFF254))
#define VICVectCntl22	(*(volatile DWORD*)(0xFFFFF258))
#define VICVectCntl23	(*(volatile DWORD*)(0xFFFFF25C))
#define VICVectCntl24	(*(volatile DWORD*)(0xFFFFF260))
#define VICVectCntl25	(*(volatile DWORD*)(0xFFFFF264))
#define VICVectCntl26	(*(volatile DWORD*)(0xFFFFF268))
#define VICVectCntl27	(*(volatile DWORD*)(0xFFFFF26C))
#define VICVectCntl28	(*(volatile DWORD*)(0xFFFFF270))
#define VICVectCntl29	(*(volatile DWORD*)(0xFFFFF274))
#define VICVectCntl30	(*(volatile DWORD*)(0xFFFFF278))
#define VICVectCntl31	(*(volatile DWORD*)(0xFFFFF27C))
#define VICVectAddr		(*(volatile DWORD*)(0xFFFFFF00))

#define PINSEL0			(*(volatile DWORD*)(0xE002C000))
#define PINSEL1			(*(volatile DWORD*)(0xE002C004))
#define PINSEL2			(*(volatile DWORD*)(0xE002C008))
#define PINSEL3			(*(volatile DWORD*)(0xE002C00C))
#define PINSEL4			(*(volatile DWORD*)(0xE002C010))
#define PINSEL5			(*(volatile DWORD*)(0xE002C014))
#define PINSEL6			(*(volatile DWORD*)(0xE002C018))
#define PINSEL7			(*(volatile DWORD*)(0xE002C01C))
#define PINSEL8			(*(volatile DWORD*)(0xE002C020))
#define PINSEL9			(*(volatile DWORD*)(0xE002C024))
#define PINSEL10		(*(volatile DWORD*)(0xE002C028))

#define PINMODE0		(*(volatile DWORD*)(0xE002C040))
#define PINMODE1		(*(volatile DWORD*)(0xE002C044))
#define PINMODE2		(*(volatile DWORD*)(0xE002C048))
#define PINMODE3		(*(volatile DWORD*)(0xE002C04C))
#define PINMODE4		(*(volatile DWORD*)(0xE002C050))
#define PINMODE5		(*(volatile DWORD*)(0xE002C054))
#define PINMODE6		(*(volatile DWORD*)(0xE002C058))
#define PINMODE7		(*(volatile DWORD*)(0xE002C05C))
#define PINMODE8		(*(volatile DWORD*)(0xE002C060))
#define PINMODE9		(*(volatile DWORD*)(0xE002C064))

#define IOPIN0			(*(volatile DWORD*)(0xE0028000))
#define IOSET0			(*(volatile DWORD*)(0xE0028004))
#define IODIR0			(*(volatile DWORD*)(0xE0028008))
#define IOCLR0			(*(volatile DWORD*)(0xE002800C))
#define IOPIN1			(*(volatile DWORD*)(0xE0028010))
#define IOSET1			(*(volatile DWORD*)(0xE0028014))
#define IODIR1			(*(volatile DWORD*)(0xE0028018))
#define IOCLR1			(*(volatile DWORD*)(0xE002801C))

#define IO0_INT_EN_R	(*(volatile DWORD*)(0xE0028090))
#define IO0_INT_EN_F	(*(volatile DWORD*)(0xE0028094))
#define IO0_INT_STAT_R	(*(volatile DWORD*)(0xE0028084))
#define IO0_INT_STAT_F	(*(volatile DWORD*)(0xE0028088))
#define IO0_INT_CLR		(*(volatile DWORD*)(0xE002808C))
#define IO2_INT_EN_R	(*(volatile DWORD*)(0xE00280B0))
#define IO2_INT_EN_F	(*(volatile DWORD*)(0xE00280B4))
#define IO2_INT_STAT_R	(*(volatile DWORD*)(0xE00280A4))
#define IO2_INT_STAT_F	(*(volatile DWORD*)(0xE00280A8))
#define IO2_INT_CLR		(*(volatile DWORD*)(0xE00280AC))
#define IO_INT_STAT		(*(volatile DWORD*)(0xE0028080))

#define PARTCFG			(*(volatile DWORD*)(0x3FFF8000))

#define FIO0DIR			(*(volatile DWORD*)(0x3FFFC000))
#define FIO0MASK		(*(volatile DWORD*)(0x3FFFC010))
#define FIO0PIN			(*(volatile DWORD*)(0x3FFFC014))
#define FIO0SET			(*(volatile DWORD*)(0x3FFFC018))
#define FIO0CLR			(*(volatile DWORD*)(0x3FFFC01C))
#define FIO1DIR			(*(volatile DWORD*)(0x3FFFC020))
#define FIO1MASK		(*(volatile DWORD*)(0x3FFFC030))
#define FIO1PIN			(*(volatile DWORD*)(0x3FFFC034))
#define FIO1SET			(*(volatile DWORD*)(0x3FFFC038))
#define FIO1CLR			(*(volatile DWORD*)(0x3FFFC03C))
#define FIO2DIR			(*(volatile DWORD*)(0x3FFFC040))
#define FIO2MASK		(*(volatile DWORD*)(0x3FFFC050))
#define FIO2PIN			(*(volatile DWORD*)(0x3FFFC054))
#define FIO2SET			(*(volatile DWORD*)(0x3FFFC058))
#define FIO2CLR			(*(volatile DWORD*)(0x3FFFC05C))
#define FIO3DIR			(*(volatile DWORD*)(0x3FFFC060))
#define FIO3MASK		(*(volatile DWORD*)(0x3FFFC070))
#define FIO3PIN			(*(volatile DWORD*)(0x3FFFC074))
#define FIO3SET			(*(volatile DWORD*)(0x3FFFC078))
#define FIO3CLR			(*(volatile DWORD*)(0x3FFFC07C))
#define FIO4DIR			(*(volatile DWORD*)(0x3FFFC080))
#define FIO4MASK		(*(volatile DWORD*)(0x3FFFC090))
#define FIO4PIN			(*(volatile DWORD*)(0x3FFFC094))
#define FIO4SET			(*(volatile DWORD*)(0x3FFFC098))
#define FIO4CLR			(*(volatile DWORD*)(0x3FFFC09C))

#define FIO0DIR0		(*(volatile BYTE*)(0x3FFFC000))
#define FIO1DIR0		(*(volatile BYTE*)(0x3FFFC020))
#define FIO2DIR0		(*(volatile BYTE*)(0x3FFFC040))
#define FIO3DIR0		(*(volatile BYTE*)(0x3FFFC060))
#define FIO4DIR0		(*(volatile BYTE*)(0x3FFFC080))
#define FIO0DIR1		(*(volatile BYTE*)(0x3FFFC001))
#define FIO1DIR1		(*(volatile BYTE*)(0x3FFFC021))
#define FIO2DIR1		(*(volatile BYTE*)(0x3FFFC041))
#define FIO3DIR1		(*(volatile BYTE*)(0x3FFFC061))
#define FIO4DIR1		(*(volatile BYTE*)(0x3FFFC081))
#define FIO0DIR2		(*(volatile BYTE*)(0x3FFFC002))
#define FIO1DIR2		(*(volatile BYTE*)(0x3FFFC022))
#define FIO2DIR2		(*(volatile BYTE*)(0x3FFFC042))
#define FIO3DIR2		(*(volatile BYTE*)(0x3FFFC062))
#define FIO4DIR2		(*(volatile BYTE*)(0x3FFFC082))
#define FIO0DIR3		(*(volatile BYTE*)(0x3FFFC003))
#define FIO1DIR3		(*(volatile BYTE*)(0x3FFFC023))
#define FIO2DIR3		(*(volatile BYTE*)(0x3FFFC043))
#define FIO3DIR3		(*(volatile BYTE*)(0x3FFFC063))
#define FIO4DIR3		(*(volatile BYTE*)(0x3FFFC083))

#define FIO0DIRL		(*(volatile WORD*)(0x3FFFC000))
#define FIO1DIRL		(*(volatile WORD*)(0x3FFFC020))
#define FIO2DIRL		(*(volatile WORD*)(0x3FFFC040))
#define FIO3DIRL		(*(volatile WORD*)(0x3FFFC060))
#define FIO4DIRL		(*(volatile WORD*)(0x3FFFC080))
#define FIO0DIRU		(*(volatile WORD*)(0x3FFFC002))
#define FIO1DIRU		(*(volatile WORD*)(0x3FFFC022))
#define FIO2DIRU		(*(volatile WORD*)(0x3FFFC042))
#define FIO3DIRU		(*(volatile WORD*)(0x3FFFC062))
#define FIO4DIRU		(*(volatile WORD*)(0x3FFFC082))

#define FIO0MASK0		(*(volatile BYTE*)(0x3FFFC010))
#define FIO1MASK0		(*(volatile BYTE*)(0x3FFFC030))
#define FIO2MASK0		(*(volatile BYTE*)(0x3FFFC050))
#define FIO3MASK0		(*(volatile BYTE*)(0x3FFFC070))
#define FIO4MASK0		(*(volatile BYTE*)(0x3FFFC090))
#define FIO0MASK1		(*(volatile BYTE*)(0x3FFFC011))
#define FIO1MASK1		(*(volatile BYTE*)(0x3FFFC021))
#define FIO2MASK1		(*(volatile BYTE*)(0x3FFFC051))
#define FIO3MASK1		(*(volatile BYTE*)(0x3FFFC071))
#define FIO4MASK1		(*(volatile BYTE*)(0x3FFFC091))
#define FIO0MASK2		(*(volatile BYTE*)(0x3FFFC012))
#define FIO1MASK2		(*(volatile BYTE*)(0x3FFFC032))
#define FIO2MASK2		(*(volatile BYTE*)(0x3FFFC052))
#define FIO3MASK2		(*(volatile BYTE*)(0x3FFFC072))
#define FIO4MASK2		(*(volatile BYTE*)(0x3FFFC092))
#define FIO0MASK3		(*(volatile BYTE*)(0x3FFFC013))
#define FIO1MASK3		(*(volatile BYTE*)(0x3FFFC033))
#define FIO2MASK3		(*(volatile BYTE*)(0x3FFFC053))
#define FIO3MASK3		(*(volatile BYTE*)(0x3FFFC073))
#define FIO4MASK3		(*(volatile BYTE*)(0x3FFFC093))

#define FIO0MASKL		(*(volatile WORD*)(0x3FFFC010))
#define FIO1MASKL		(*(volatile WORD*)(0x3FFFC030))
#define FIO2MASKL		(*(volatile WORD*)(0x3FFFC050))
#define FIO3MASKL		(*(volatile WORD*)(0x3FFFC070))
#define FIO4MASKL		(*(volatile WORD*)(0x3FFFC090))
#define FIO0MASKU		(*(volatile WORD*)(0x3FFFC012))
#define FIO1MASKU		(*(volatile WORD*)(0x3FFFC032))
#define FIO2MASKU		(*(volatile WORD*)(0x3FFFC052))
#define FIO3MASKU		(*(volatile WORD*)(0x3FFFC072))
#define FIO4MASKU		(*(volatile WORD*)(0x3FFFC092))

#define FIO0PIN0		(*(volatile BYTE*)(0x3FFFC014))
#define FIO1PIN0		(*(volatile BYTE*)(0x3FFFC034))
#define FIO2PIN0		(*(volatile BYTE*)(0x3FFFC054))
#define FIO3PIN0		(*(volatile BYTE*)(0x3FFFC074))
#define FIO4PIN0		(*(volatile BYTE*)(0x3FFFC094))
#define FIO0PIN1		(*(volatile BYTE*)(0x3FFFC015))
#define FIO1PIN1		(*(volatile BYTE*)(0x3FFFC025))
#define FIO2PIN1		(*(volatile BYTE*)(0x3FFFC055))
#define FIO3PIN1		(*(volatile BYTE*)(0x3FFFC075))
#define FIO4PIN1		(*(volatile BYTE*)(0x3FFFC095))
#define FIO0PIN2		(*(volatile BYTE*)(0x3FFFC016))
#define FIO1PIN2		(*(volatile BYTE*)(0x3FFFC036))
#define FIO2PIN2		(*(volatile BYTE*)(0x3FFFC056))
#define FIO3PIN2		(*(volatile BYTE*)(0x3FFFC076))
#define FIO4PIN2		(*(volatile BYTE*)(0x3FFFC096))
#define FIO0PIN3		(*(volatile BYTE*)(0x3FFFC017))
#define FIO1PIN3		(*(volatile BYTE*)(0x3FFFC037))
#define FIO2PIN3		(*(volatile BYTE*)(0x3FFFC057))
#define FIO3PIN3		(*(volatile BYTE*)(0x3FFFC077))
#define FIO4PIN3		(*(volatile BYTE*)(0x3FFFC097))

#define FIO0PINL		(*(volatile WORD*)(0x3FFFC014))
#define FIO1PINL		(*(volatile WORD*)(0x3FFFC034))
#define FIO2PINL		(*(volatile WORD*)(0x3FFFC054))
#define FIO3PINL		(*(volatile WORD*)(0x3FFFC074))
#define FIO4PINL		(*(volatile WORD*)(0x3FFFC094))
#define FIO0PINU		(*(volatile WORD*)(0x3FFFC016))
#define FIO1PINU		(*(volatile WORD*)(0x3FFFC036))
#define FIO2PINU		(*(volatile WORD*)(0x3FFFC056))
#define FIO3PINU		(*(volatile WORD*)(0x3FFFC076))
#define FIO4PINU		(*(volatile WORD*)(0x3FFFC096))

#define FIO0SET0		(*(volatile BYTE*)(0x3FFFC018))
#define FIO1SET0		(*(volatile BYTE*)(0x3FFFC038))
#define FIO2SET0		(*(volatile BYTE*)(0x3FFFC058))
#define FIO3SET0		(*(volatile BYTE*)(0x3FFFC078))
#define FIO4SET0		(*(volatile BYTE*)(0x3FFFC098))
#define FIO0SET1		(*(volatile BYTE*)(0x3FFFC019))
#define FIO1SET1		(*(volatile BYTE*)(0x3FFFC029))
#define FIO2SET1		(*(volatile BYTE*)(0x3FFFC059))
#define FIO3SET1		(*(volatile BYTE*)(0x3FFFC079))
#define FIO4SET1		(*(volatile BYTE*)(0x3FFFC099))
#define FIO0SET2		(*(volatile BYTE*)(0x3FFFC01A))
#define FIO1SET2		(*(volatile BYTE*)(0x3FFFC03A))
#define FIO2SET2		(*(volatile BYTE*)(0x3FFFC05A))
#define FIO3SET2		(*(volatile BYTE*)(0x3FFFC07A))
#define FIO4SET2		(*(volatile BYTE*)(0x3FFFC09A))
#define FIO0SET3		(*(volatile BYTE*)(0x3FFFC01B))
#define FIO1SET3		(*(volatile BYTE*)(0x3FFFC03B))
#define FIO2SET3		(*(volatile BYTE*)(0x3FFFC05B))
#define FIO3SET3		(*(volatile BYTE*)(0x3FFFC07B))
#define FIO4SET3		(*(volatile BYTE*)(0x3FFFC09B))

#define FIO0SETL		(*(volatile WORD*)(0x3FFFC018))
#define FIO1SETL		(*(volatile WORD*)(0x3FFFC038))
#define FIO2SETL		(*(volatile WORD*)(0x3FFFC058))
#define FIO3SETL		(*(volatile WORD*)(0x3FFFC078))
#define FIO4SETL		(*(volatile WORD*)(0x3FFFC098))
#define FIO0SETU		(*(volatile WORD*)(0x3FFFC01A))
#define FIO1SETU		(*(volatile WORD*)(0x3FFFC03A))
#define FIO2SETU		(*(volatile WORD*)(0x3FFFC05A))
#define FIO3SETU		(*(volatile WORD*)(0x3FFFC07A))
#define FIO4SETU		(*(volatile WORD*)(0x3FFFC09A))

#define FIO0CLR0		(*(volatile BYTE*)(0x3FFFC01C))
#define FIO1CLR0		(*(volatile BYTE*)(0x3FFFC03C))
#define FIO2CLR0		(*(volatile BYTE*)(0x3FFFC05C))
#define FIO3CLR0		(*(volatile BYTE*)(0x3FFFC07C))
#define FIO4CLR0		(*(volatile BYTE*)(0x3FFFC09C))
#define FIO0CLR1		(*(volatile BYTE*)(0x3FFFC01D))
#define FIO1CLR1		(*(volatile BYTE*)(0x3FFFC02D))
#define FIO2CLR1		(*(volatile BYTE*)(0x3FFFC05D))
#define FIO3CLR1		(*(volatile BYTE*)(0x3FFFC07D))
#define FIO4CLR1		(*(volatile BYTE*)(0x3FFFC09D))
#define FIO0CLR2		(*(volatile BYTE*)(0x3FFFC01E))
#define FIO1CLR2		(*(volatile BYTE*)(0x3FFFC03E))
#define FIO2CLR2		(*(volatile BYTE*)(0x3FFFC05E))
#define FIO3CLR2		(*(volatile BYTE*)(0x3FFFC07E))
#define FIO4CLR2		(*(volatile BYTE*)(0x3FFFC09E))
#define FIO0CLR3		(*(volatile BYTE*)(0x3FFFC01F))
#define FIO1CLR3		(*(volatile BYTE*)(0x3FFFC03F))
#define FIO2CLR3		(*(volatile BYTE*)(0x3FFFC05F))
#define FIO3CLR3		(*(volatile BYTE*)(0x3FFFC07F))
#define FIO4CLR3		(*(volatile BYTE*)(0x3FFFC09F))

#define FIO0CLRL		(*(volatile WORD*)(0x3FFFC01C))
#define FIO1CLRL		(*(volatile WORD*)(0x3FFFC03C))
#define FIO2CLRL		(*(volatile WORD*)(0x3FFFC05C))
#define FIO3CLRL		(*(volatile WORD*)(0x3FFFC07C))
#define FIO4CLRL		(*(volatile WORD*)(0x3FFFC09C))
#define FIO0CLRU		(*(volatile WORD*)(0x3FFFC01E))
#define FIO1CLRU		(*(volatile WORD*)(0x3FFFC03E))
#define FIO2CLRU		(*(volatile WORD*)(0x3FFFC05E))
#define FIO3CLRU		(*(volatile WORD*)(0x3FFFC07E))
#define FIO4CLRU		(*(volatile WORD*)(0x3FFFC09E))

#define MAMCR			(*(volatile DWORD*)(0xE01FC000))
#define MAMTIM			(*(volatile DWORD*)(0xE01FC004))
#define MEMMAP			(*(volatile DWORD*)(0xE01FC040))

#define PLLCON			(*(volatile DWORD*)(0xE01FC080))
#define PLLCFG			(*(volatile DWORD*)(0xE01FC084))
#define PLLSTAT			(*(volatile DWORD*)(0xE01FC088))
#define PLLFEED			(*(volatile DWORD*)(0xE01FC08C))

#define PCON			(*(volatile DWORD*)(0xE01FC0C0))
#define PCONP			(*(volatile DWORD*)(0xE01FC0C4))

#define CCLKCFG			(*(volatile DWORD*)(0xE01FC104))
#define USBCLKCFG		(*(volatile DWORD*)(0xE01FC108))
#define CLKSRCSEL		(*(volatile DWORD*)(0xE01FC10C))
#define PCLKSEL0		(*(volatile DWORD*)(0xE01FC1A8))
#define PCLKSEL1		(*(volatile DWORD*)(0xE01FC1AC))

#define EXTINT			(*(volatile DWORD*)(0xE01FC140))
#define INTWAKE			(*(volatile DWORD*)(0xE01FC144))
#define EXTMODE			(*(volatile DWORD*)(0xE01FC148))
#define EXTPOLAR		(*(volatile DWORD*)(0xE01FC14C))

#define RSIR			(*(volatile DWORD*)(0xE01FC180))

#define CSPR			(*(volatile DWORD*)(0xE01FC184))

#define AHBCFG1			(*(volatile DWORD*)(0xE01FC188))
#define AHBCFG2			(*(volatile DWORD*)(0xE01FC18C))

#define SCS				(*(volatile DWORD*)(0xE01FC1A0))

#define EMC_CTRL		(*(volatile DWORD*)(0xFFE08000))
#define EMC_STAT		(*(volatile DWORD*)(0xFFE08004))
#define EMC_CONFIG		(*(volatile DWORD*)(0xFFE08008))

#define EMC_DYN_CTRL	(*(volatile DWORD*)(0xFFE08020))
#define EMC_DYN_RFSH	(*(volatile DWORD*)(0xFFE08024))
#define EMC_DYN_RD_CFG	(*(volatile DWORD*)(0xFFE08028))
#define EMC_DYN_RP		(*(volatile DWORD*)(0xFFE08030))
#define EMC_DYN_RAS		(*(volatile DWORD*)(0xFFE08034))
#define EMC_DYN_SREX	(*(volatile DWORD*)(0xFFE08038))
#define EMC_DYN_APR		(*(volatile DWORD*)(0xFFE0803C))
#define EMC_DYN_DAL		(*(volatile DWORD*)(0xFFE08040))
#define EMC_DYN_WR		(*(volatile DWORD*)(0xFFE08044))
#define EMC_DYN_RC		(*(volatile DWORD*)(0xFFE08048))
#define EMC_DYN_RFC		(*(volatile DWORD*)(0xFFE0804C))
#define EMC_DYN_XSR		(*(volatile DWORD*)(0xFFE08050))
#define EMC_DYN_RRD		(*(volatile DWORD*)(0xFFE08054))
#define EMC_DYN_MRD		(*(volatile DWORD*)(0xFFE08058))

#define EMC_DYN_CFG0     (*(volatile DWORD*)(0xFFE08100))
#define EMC_DYN_RASCAS0  (*(volatile DWORD*)(0xFFE08104))
#define EMC_DYN_CFG1     (*(volatile DWORD*)(0xFFE08140))
#define EMC_DYN_RASCAS1  (*(volatile DWORD*)(0xFFE08144))
#define EMC_DYN_CFG2     (*(volatile DWORD*)(0xFFE08160))
#define EMC_DYN_RASCAS2  (*(volatile DWORD*)(0xFFE08164))
#define EMC_DYN_CFG3     (*(volatile DWORD*)(0xFFE08180))
#define EMC_DYN_RASCAS3  (*(volatile DWORD*)(0xFFE08184))

#define EMC_STA_CFG0      (*(volatile DWORD*)(0xFFE08200))
#define EMC_STA_WAITWEN0  (*(volatile DWORD*)(0xFFE08204))
#define EMC_STA_WAITOEN0  (*(volatile DWORD*)(0xFFE08208))
#define EMC_STA_WAITRD0   (*(volatile DWORD*)(0xFFE0820C))
#define EMC_STA_WAITPAGE0 (*(volatile DWORD*)(0xFFE08210))
#define EMC_STA_WAITWR0   (*(volatile DWORD*)(0xFFE08214))
#define EMC_STA_WAITTURN0 (*(volatile DWORD*)(0xFFE08218))

#define EMC_STA_CFG1      (*(volatile DWORD*)(0xFFE08220))
#define EMC_STA_WAITWEN1  (*(volatile DWORD*)(0xFFE08224))
#define EMC_STA_WAITOEN1  (*(volatile DWORD*)(0xFFE08228))
#define EMC_STA_WAITRD1   (*(volatile DWORD*)(0xFFE0822C))
#define EMC_STA_WAITPAGE1 (*(volatile DWORD*)(0xFFE08230))
#define EMC_STA_WAITWR1   (*(volatile DWORD*)(0xFFE08234))
#define EMC_STA_WAITTURN1 (*(volatile DWORD*)(0xFFE08238))

#define EMC_STA_CFG2      (*(volatile DWORD*)(0xFFE08240))
#define EMC_STA_WAITWEN2  (*(volatile DWORD*)(0xFFE08244))
#define EMC_STA_WAITOEN2  (*(volatile DWORD*)(0xFFE08248))
#define EMC_STA_WAITRD2   (*(volatile DWORD*)(0xFFE0824C))
#define EMC_STA_WAITPAGE2 (*(volatile DWORD*)(0xFFE08250))
#define EMC_STA_WAITWR2   (*(volatile DWORD*)(0xFFE08254))
#define EMC_STA_WAITTURN2 (*(volatile DWORD*)(0xFFE08258))

#define EMC_STA_CFG3      (*(volatile DWORD*)(0xFFE08260))
#define EMC_STA_WAITWEN3  (*(volatile DWORD*)(0xFFE08264))
#define EMC_STA_WAITOEN3  (*(volatile DWORD*)(0xFFE08268))
#define EMC_STA_WAITRD3   (*(volatile DWORD*)(0xFFE0826C))
#define EMC_STA_WAITPAGE3 (*(volatile DWORD*)(0xFFE08270))
#define EMC_STA_WAITWR3   (*(volatile DWORD*)(0xFFE08274))
#define EMC_STA_WAITTURN3 (*(volatile DWORD*)(0xFFE08278))

#define EMC_STA_EXT_WAIT  (*(volatile DWORD*)(0xFFE08880))

#define T0IR			(*(volatile DWORD*)(0xE0004000))
#define T0TCR			(*(volatile DWORD*)(0xE0004004))
#define T0TC			(*(volatile DWORD*)(0xE0004008))
#define T0PR			(*(volatile DWORD*)(0xE000400C))
#define T0PC			(*(volatile DWORD*)(0xE0004010))
#define T0MCR			(*(volatile DWORD*)(0xE0004014))
#define T0MR0			(*(volatile DWORD*)(0xE0004018))
#define T0MR1			(*(volatile DWORD*)(0xE000401C))
#define T0MR2			(*(volatile DWORD*)(0xE0004020))
#define T0MR3			(*(volatile DWORD*)(0xE0004024))
#define T0CCR			(*(volatile DWORD*)(0xE0004028))
#define T0CR0			(*(volatile DWORD*)(0xE000402C))
#define T0CR1			(*(volatile DWORD*)(0xE0004030))
#define T0CR2			(*(volatile DWORD*)(0xE0004034))
#define T0CR3			(*(volatile DWORD*)(0xE0004038))
#define T0EMR			(*(volatile DWORD*)(0xE000403C))
#define T0CTCR			(*(volatile DWORD*)(0xE0004070))

#define T1IR			(*(volatile DWORD*)(0xE0008000))
#define T1TCR			(*(volatile DWORD*)(0xE0008004))
#define T1TC			(*(volatile DWORD*)(0xE0008008))
#define T1PR			(*(volatile DWORD*)(0xE000800C))
#define T1PC			(*(volatile DWORD*)(0xE0008010))
#define T1MCR			(*(volatile DWORD*)(0xE0008014))
#define T1MR0			(*(volatile DWORD*)(0xE0008018))
#define T1MR1			(*(volatile DWORD*)(0xE000801C))
#define T1MR2			(*(volatile DWORD*)(0xE0008020))
#define T1MR3			(*(volatile DWORD*)(0xE0008024))
#define T1CCR			(*(volatile DWORD*)(0xE0008028))
#define T1CR0			(*(volatile DWORD*)(0xE000802C))
#define T1CR1			(*(volatile DWORD*)(0xE0008030))
#define T1CR2			(*(volatile DWORD*)(0xE0008034))
#define T1CR3			(*(volatile DWORD*)(0xE0008038))
#define T1EMR			(*(volatile DWORD*)(0xE000803C))
#define T1CTCR			(*(volatile DWORD*)(0xE0008070))

#define T2IR			(*(volatile DWORD*)(0xE0070000))
#define T2TCR			(*(volatile DWORD*)(0xE0070004))
#define T2TC			(*(volatile DWORD*)(0xE0070008))
#define T2PR			(*(volatile DWORD*)(0xE007000C))
#define T2PC			(*(volatile DWORD*)(0xE0070010))
#define T2MCR			(*(volatile DWORD*)(0xE0070014))
#define T2MR0			(*(volatile DWORD*)(0xE0070018))
#define T2MR1			(*(volatile DWORD*)(0xE007001C))
#define T2MR2			(*(volatile DWORD*)(0xE0070020))
#define T2MR3			(*(volatile DWORD*)(0xE0070024))
#define T2CCR			(*(volatile DWORD*)(0xE0070028))
#define T2CR0			(*(volatile DWORD*)(0xE007002C))
#define T2CR1			(*(volatile DWORD*)(0xE0070030))
#define T2CR2			(*(volatile DWORD*)(0xE0070034))
#define T2CR3			(*(volatile DWORD*)(0xE0070038))
#define T2EMR			(*(volatile DWORD*)(0xE007003C))
#define T2CTCR			(*(volatile DWORD*)(0xE0070070))

#define T3IR			(*(volatile DWORD*)(0xE0074000))
#define T3TCR			(*(volatile DWORD*)(0xE0074004))
#define T3TC			(*(volatile DWORD*)(0xE0074008))
#define T3PR			(*(volatile DWORD*)(0xE007400C))
#define T3PC			(*(volatile DWORD*)(0xE0074010))
#define T3MCR			(*(volatile DWORD*)(0xE0074014))
#define T3MR0			(*(volatile DWORD*)(0xE0074018))
#define T3MR1			(*(volatile DWORD*)(0xE007401C))
#define T3MR2			(*(volatile DWORD*)(0xE0074020))
#define T3MR3			(*(volatile DWORD*)(0xE0074024))
#define T3CCR			(*(volatile DWORD*)(0xE0074028))
#define T3CR0			(*(volatile DWORD*)(0xE007402C))
#define T3CR1			(*(volatile DWORD*)(0xE0074030))
#define T3CR2			(*(volatile DWORD*)(0xE0074034))
#define T3CR3			(*(volatile DWORD*)(0xE0074038))
#define T3EMR			(*(volatile DWORD*)(0xE007403C))
#define T3CTCR			(*(volatile DWORD*)(0xE0074070))

#define PWM0IR			(*(volatile DWORD*)(0xE0014000))
#define PWM0TCR			(*(volatile DWORD*)(0xE0014004))
#define PWM0TC			(*(volatile DWORD*)(0xE0014008))
#define PWM0PR			(*(volatile DWORD*)(0xE001400C))
#define PWM0PC			(*(volatile DWORD*)(0xE0014010))
#define PWM0MCR			(*(volatile DWORD*)(0xE0014014))
#define PWM0MR0			(*(volatile DWORD*)(0xE0014018))
#define PWM0MR1			(*(volatile DWORD*)(0xE001401C))
#define PWM0MR2			(*(volatile DWORD*)(0xE0014020))
#define PWM0MR3			(*(volatile DWORD*)(0xE0014024))
#define PWM0CCR			(*(volatile DWORD*)(0xE0014028))
#define PWM0CR0			(*(volatile DWORD*)(0xE001402C))
#define PWM0CR1			(*(volatile DWORD*)(0xE0014030))
#define PWM0CR2			(*(volatile DWORD*)(0xE0014034))
#define PWM0CR3			(*(volatile DWORD*)(0xE0014038))
#define PWM0EMR			(*(volatile DWORD*)(0xE001403C))
#define PWM0MR4			(*(volatile DWORD*)(0xE0014040))
#define PWM0MR5			(*(volatile DWORD*)(0xE0014044))
#define PWM0MR6			(*(volatile DWORD*)(0xE0014048))
#define PWM0PCR			(*(volatile DWORD*)(0xE001404C))
#define PWM0LER			(*(volatile DWORD*)(0xE0014050))
#define PWM0CTCR		(*(volatile DWORD*)(0xE0014070))

#define PWM1IR			(*(volatile DWORD*)(0xE0018000))
#define PWM1TCR			(*(volatile DWORD*)(0xE0018004))
#define PWM1TC			(*(volatile DWORD*)(0xE0018008))
#define PWM1PR			(*(volatile DWORD*)(0xE001800C))
#define PWM1PC			(*(volatile DWORD*)(0xE0018010))
#define PWM1MCR			(*(volatile DWORD*)(0xE0018014))
#define PWM1MR0			(*(volatile DWORD*)(0xE0018018))
#define PWM1MR1			(*(volatile DWORD*)(0xE001801C))
#define PWM1MR2			(*(volatile DWORD*)(0xE0018020))
#define PWM1MR3			(*(volatile DWORD*)(0xE0018024))
#define PWM1CCR			(*(volatile DWORD*)(0xE0018028))
#define PWM1CR0			(*(volatile DWORD*)(0xE001802C))
#define PWM1CR1			(*(volatile DWORD*)(0xE0018030))
#define PWM1CR2			(*(volatile DWORD*)(0xE0018034))
#define PWM1CR3			(*(volatile DWORD*)(0xE0018038))
#define PWM1EMR			(*(volatile DWORD*)(0xE001803C))
#define PWM1MR4			(*(volatile DWORD*)(0xE0018040))
#define PWM1MR5			(*(volatile DWORD*)(0xE0018044))
#define PWM1MR6			(*(volatile DWORD*)(0xE0018048))
#define PWM1PCR			(*(volatile DWORD*)(0xE001804C))
#define PWM1LER			(*(volatile DWORD*)(0xE0018050))
#define PWM1CTCR		(*(volatile DWORD*)(0xE0018070))

#define U0RBR			(*(volatile DWORD*)(0xE000C000))
#define U0THR			(*(volatile DWORD*)(0xE000C000))
#define U0DLL			(*(volatile DWORD*)(0xE000C000))
#define U0DLM			(*(volatile DWORD*)(0xE000C004))
#define U0IER			(*(volatile DWORD*)(0xE000C004))
#define U0IIR			(*(volatile DWORD*)(0xE000C008))
#define U0FCR			(*(volatile DWORD*)(0xE000C008))
#define U0LCR			(*(volatile DWORD*)(0xE000C00C))
#define U0LSR			(*(volatile DWORD*)(0xE000C014))
#define U0SCR			(*(volatile DWORD*)(0xE000C01C))
#define U0ACR			(*(volatile DWORD*)(0xE000C020))
#define U0ICR			(*(volatile DWORD*)(0xE000C024))
#define U0FDR			(*(volatile DWORD*)(0xE000C028))
#define U0TER			(*(volatile DWORD*)(0xE000C030))

#define U1RBR			(*(volatile DWORD*)(0xE0010000))
#define U1THR			(*(volatile DWORD*)(0xE0010000))
#define U1DLL			(*(volatile DWORD*)(0xE0010000))
#define U1DLM			(*(volatile DWORD*)(0xE0010004))
#define U1IER			(*(volatile DWORD*)(0xE0010004))
#define U1IIR			(*(volatile DWORD*)(0xE0010008))
#define U1FCR			(*(volatile DWORD*)(0xE0010008))
#define U1LCR			(*(volatile DWORD*)(0xE001000C))
#define U1MCR			(*(volatile DWORD*)(0xE0010010))
#define U1LSR			(*(volatile DWORD*)(0xE0010014))
#define U1MSR			(*(volatile DWORD*)(0xE0010018))
#define U1SCR			(*(volatile DWORD*)(0xE001001C))
#define U1ACR			(*(volatile DWORD*)(0xE0010020))
#define U1FDR			(*(volatile DWORD*)(0xE0010028))
#define U1TER			(*(volatile DWORD*)(0xE0010030))

#define U2RBR			(*(volatile DWORD*)(0xE0078000))
#define U2THR			(*(volatile DWORD*)(0xE0078000))
#define U2DLL			(*(volatile DWORD*)(0xE0078000))
#define U2DLM			(*(volatile DWORD*)(0xE0078004))
#define U2IER			(*(volatile DWORD*)(0xE0078004))
#define U2IIR			(*(volatile DWORD*)(0xE0078008))
#define U2FCR			(*(volatile DWORD*)(0xE0078008))
#define U2LCR			(*(volatile DWORD*)(0xE007800C))
#define U2LSR			(*(volatile DWORD*)(0xE0078014))
#define U2SCR			(*(volatile DWORD*)(0xE007801C))
#define U2ACR			(*(volatile DWORD*)(0xE0078020))
#define U2ICR			(*(volatile DWORD*)(0xE0078024))
#define U2FDR			(*(volatile DWORD*)(0xE0078028))
#define U2TER			(*(volatile DWORD*)(0xE0078030))

#define U3RBR			(*(volatile DWORD*)(0xE007C000))
#define U3THR			(*(volatile DWORD*)(0xE007C000))
#define U3DLL			(*(volatile DWORD*)(0xE007C000))
#define U3DLM			(*(volatile DWORD*)(0xE007C004))
#define U3IER			(*(volatile DWORD*)(0xE007C004))
#define U3IIR			(*(volatile DWORD*)(0xE007C008))
#define U3FCR			(*(volatile DWORD*)(0xE007C008))
#define U3LCR			(*(volatile DWORD*)(0xE007C00C))
#define U3LSR			(*(volatile DWORD*)(0xE007C014))
#define U3SCR			(*(volatile DWORD*)(0xE007C01C))
#define U3ACR			(*(volatile DWORD*)(0xE007C020))
#define U3ICR			(*(volatile DWORD*)(0xE007C024))
#define U3FDR			(*(volatile DWORD*)(0xE007C028))
#define U3TER			(*(volatile DWORD*)(0xE007C030))

#define I20CONSET		(*(volatile DWORD*)(0xE001C000))
#define I20STAT			(*(volatile DWORD*)(0xE001C004))
#define I20DAT			(*(volatile DWORD*)(0xE001C008))
#define I20ADR			(*(volatile DWORD*)(0xE001C00C))
#define I20SCLH			(*(volatile DWORD*)(0xE001C010))
#define I20SCLL			(*(volatile DWORD*)(0xE001C014))
#define I20CONCLR		(*(volatile DWORD*)(0xE001C018))

#define I21CONSET		(*(volatile DWORD*)(0xE005C000))
#define I21STAT			(*(volatile DWORD*)(0xE005C004))
#define I21DAT			(*(volatile DWORD*)(0xE005C008))
#define I21ADR			(*(volatile DWORD*)(0xE005C00C))
#define I21SCLH			(*(volatile DWORD*)(0xE005C010))
#define I21SCLL			(*(volatile DWORD*)(0xE005C014))
#define I21CONCLR		(*(volatile DWORD*)(0xE005C018))

#define I22CONSET		(*(volatile DWORD*)(0xE0080000))
#define I22STAT			(*(volatile DWORD*)(0xE0080004))
#define I22DAT			(*(volatile DWORD*)(0xE0080008))
#define I22ADR			(*(volatile DWORD*)(0xE008000C))
#define I22SCLH			(*(volatile DWORD*)(0xE0080010))
#define I22SCLL			(*(volatile DWORD*)(0xE0080014))
#define I22CONCLR		(*(volatile DWORD*)(0xE0080018))

#define S0SPCR			(*(volatile DWORD*)(0xE0020000))
#define S0SPSR			(*(volatile DWORD*)(0xE0020004))
#define S0SPDR			(*(volatile DWORD*)(0xE0020008))
#define S0SPCCR			(*(volatile DWORD*)(0xE002000C))
#define S0SPINT			(*(volatile DWORD*)(0xE002001C))

#define SSP0CR0			(*(volatile DWORD*)(0xE0068000))
#define SSP0CR1			(*(volatile DWORD*)(0xE0068004))
#define SSP0DR			(*(volatile DWORD*)(0xE0068008))
#define SSP0SR			(*(volatile DWORD*)(0xE006800C))
#define SSP0CPSR		(*(volatile DWORD*)(0xE0068010))
#define SSP0IMSC		(*(volatile DWORD*)(0xE0068014))
#define SSP0RIS			(*(volatile DWORD*)(0xE0068018))
#define SSP0MIS			(*(volatile DWORD*)(0xE006801C))
#define SSP0ICR			(*(volatile DWORD*)(0xE0068020))
#define SSP0DMACR		(*(volatile DWORD*)(0xE0068024))

#define SSP1CR0			(*(volatile DWORD*)(0xE0030000))
#define SSP1CR1			(*(volatile DWORD*)(0xE0030004))
#define SSP1DR			(*(volatile DWORD*)(0xE0030008))
#define SSP1SR			(*(volatile DWORD*)(0xE003000C))
#define SSP1CPSR		(*(volatile DWORD*)(0xE0030010))
#define SSP1IMSC		(*(volatile DWORD*)(0xE0030014))
#define SSP1RIS			(*(volatile DWORD*)(0xE0030018))
#define SSP1MIS			(*(volatile DWORD*)(0xE003001C))
#define SSP1ICR			(*(volatile DWORD*)(0xE0030020))
#define SSP1DMACR		(*(volatile DWORD*)(0xE0030024))

#define RTC_ILR			(*(volatile DWORD*)(0xE0024000))
#define RTC_CTC			(*(volatile DWORD*)(0xE0024004))
#define RTC_CCR			(*(volatile DWORD*)(0xE0024008))
#define RTC_CIIR		(*(volatile DWORD*)(0xE002400C))
#define RTC_AMR			(*(volatile DWORD*)(0xE0024010))
#define RTC_CTIME0		(*(volatile DWORD*)(0xE0024014))
#define RTC_CTIME1		(*(volatile DWORD*)(0xE0024018))
#define RTC_CTIME2		(*(volatile DWORD*)(0xE002401C))
#define RTC_SEC			(*(volatile DWORD*)(0xE0024020))
#define RTC_MIN			(*(volatile DWORD*)(0xE0024024))
#define RTC_HOUR		(*(volatile DWORD*)(0xE0024028))
#define RTC_DOM			(*(volatile DWORD*)(0xE002402C))
#define RTC_DOW			(*(volatile DWORD*)(0xE0024030))
#define RTC_DOY			(*(volatile DWORD*)(0xE0024034))
#define RTC_MONTH		(*(volatile DWORD*)(0xE0024038))
#define RTC_YEAR		(*(volatile DWORD*)(0xE002403C))
#define RTC_CISS		(*(volatile DWORD*)(0xE0024040))
#define RTC_ALSEC		(*(volatile DWORD*)(0xE0024060))
#define RTC_ALMIN		(*(volatile DWORD*)(0xE0024064))
#define RTC_ALHOUR		(*(volatile DWORD*)(0xE0024068))
#define RTC_ALDOM		(*(volatile DWORD*)(0xE002406C))
#define RTC_ALDOW		(*(volatile DWORD*)(0xE0024070))
#define RTC_ALDOY		(*(volatile DWORD*)(0xE0024074))
#define RTC_ALMON		(*(volatile DWORD*)(0xE0024078))
#define RTC_ALYEAR		(*(volatile DWORD*)(0xE002407C))
#define RTC_PREINT		(*(volatile DWORD*)(0xE0024080))
#define RTC_PREFRAC		(*(volatile DWORD*)(0xE0024084))

#define AD0CR			(*(volatile DWORD*)(0xE0034000))
#define AD0GDR			(*(volatile DWORD*)(0xE0034004))
#define AD0INTEN		(*(volatile DWORD*)(0xE003400C))
#define AD0DR0			(*(volatile DWORD*)(0xE0034010))
#define AD0DR1			(*(volatile DWORD*)(0xE0034014))
#define AD0DR2			(*(volatile DWORD*)(0xE0034018))
#define AD0DR3			(*(volatile DWORD*)(0xE003401C))
#define AD0DR4			(*(volatile DWORD*)(0xE0034020))
#define AD0DR5			(*(volatile DWORD*)(0xE0034024))
#define AD0DR6			(*(volatile DWORD*)(0xE0034028))
#define AD0DR7			(*(volatile DWORD*)(0xE003402C))
#define AD0STAT			(*(volatile DWORD*)(0xE0034030))

#define DACR			(*(volatile DWORD*)(0xE006C000))

#define WDMOD			(*(volatile DWORD*)(0xE0000000))
#define WDTC			(*(volatile DWORD*)(0xE0000004))
#define WDFEED			(*(volatile DWORD*)(0xE0000008))
#define WDTV			(*(volatile DWORD*)(0xE000000C))
#define WDCLKSEL		(*(volatile DWORD*)(0xE0000010))

#define CAN_AFMR		(*(volatile DWORD*)(0xE003C000))
#define CAN_SFF_SA		(*(volatile DWORD*)(0xE003C004))
#define CAN_SFF_GRP_SA	(*(volatile DWORD*)(0xE003C008))
#define CAN_EFF_SA		(*(volatile DWORD*)(0xE003C00C))
#define CAN_EFF_GRP_SA	(*(volatile DWORD*)(0xE003C010))
#define CAN_EOT			(*(volatile DWORD*)(0xE003C014))
#define CAN_LUT_ERR_ADR	(*(volatile DWORD*)(0xE003C018))
#define CAN_LUT_ERR		(*(volatile DWORD*)(0xE003C01C))

#define CAN_TX_SR		(*(volatile DWORD*)(0xE0040000))
#define CAN_RX_SR		(*(volatile DWORD*)(0xE0040004))
#define CAN_MSR			(*(volatile DWORD*)(0xE0040008))

#define CAN1MOD			(*(volatile DWORD*)(0xE0044000))
#define CAN1CMR			(*(volatile DWORD*)(0xE0044004))
#define CAN1GSR			(*(volatile DWORD*)(0xE0044008))
#define CAN1ICR			(*(volatile DWORD*)(0xE004400C))
#define CAN1IER			(*(volatile DWORD*)(0xE0044010))
#define CAN1BTR			(*(volatile DWORD*)(0xE0044014))
#define CAN1EWL			(*(volatile DWORD*)(0xE0044018))
#define CAN1SR			(*(volatile DWORD*)(0xE004401C))
#define CAN1RFS			(*(volatile DWORD*)(0xE0044020))
#define CAN1RID			(*(volatile DWORD*)(0xE0044024))
#define CAN1RDA			(*(volatile DWORD*)(0xE0044028))
#define CAN1RDB			(*(volatile DWORD*)(0xE004402C))

#define CAN1TFI1	 	(*(volatile DWORD*)(0xE0044030))
#define CAN1TID1 		(*(volatile DWORD*)(0xE0044034))
#define CAN1TDA1 		(*(volatile DWORD*)(0xE0044038))
#define CAN1TDB1 		(*(volatile DWORD*)(0xE004403C))
#define CAN1TFI2	 	(*(volatile DWORD*)(0xE0044040))
#define CAN1TID2 		(*(volatile DWORD*)(0xE0044044))
#define CAN1TDA2	 	(*(volatile DWORD*)(0xE0044048))
#define CAN1TDB2 		(*(volatile DWORD*)(0xE004404C))
#define CAN1TFI3	 	(*(volatile DWORD*)(0xE0044050))
#define CAN1TID3 		(*(volatile DWORD*)(0xE0044054))
#define CAN1TDA3	 	(*(volatile DWORD*)(0xE0044058))
#define CAN1TDB3 		(*(volatile DWORD*)(0xE004405C))

#define CAN2MOD			(*(volatile DWORD*)(0xE0048000))
#define CAN2CMR 		(*(volatile DWORD*)(0xE0048004))
#define CAN2GSR			(*(volatile DWORD*)(0xE0048008))
#define CAN2ICR 		(*(volatile DWORD*)(0xE004800C))
#define CAN2IER 		(*(volatile DWORD*)(0xE0048010))
#define CAN2BTR 		(*(volatile DWORD*)(0xE0048014))
#define CAN2EWL 		(*(volatile DWORD*)(0xE0048018))
#define CAN2SR 			(*(volatile DWORD*)(0xE004801C))
#define CAN2RFS 		(*(volatile DWORD*)(0xE0048020))
#define CAN2RID 		(*(volatile DWORD*)(0xE0048024))
#define CAN2RDA 		(*(volatile DWORD*)(0xE0048028))
#define CAN2RDB 		(*(volatile DWORD*)(0xE004802C))

#define CAN2TFI1		(*(volatile DWORD*)(0xE0048030))
#define CAN2TID1		(*(volatile DWORD*)(0xE0048034))
#define CAN2TDA1		(*(volatile DWORD*)(0xE0048038))
#define CAN2TDB1		(*(volatile DWORD*)(0xE004803C))
#define CAN2TFI2		(*(volatile DWORD*)(0xE0048040))
#define CAN2TID2 		(*(volatile DWORD*)(0xE0048044))
#define CAN2TDA2 		(*(volatile DWORD*)(0xE0048048))
#define CAN2TDB2 		(*(volatile DWORD*)(0xE004804C))
#define CAN2TFI3 		(*(volatile DWORD*)(0xE0048050))
#define CAN2TID3 		(*(volatile DWORD*)(0xE0048054))
#define CAN2TDA3 		(*(volatile DWORD*)(0xE0048058))
#define CAN2TDB3 		(*(volatile DWORD*)(0xE004805C))

#define MCI_POWER      (*(volatile DWORD*)(0xE008C000))
#define MCI_CLOCK      (*(volatile DWORD*)(0xE008C004))
#define MCI_ARGUMENT   (*(volatile DWORD*)(0xE008C008))
#define MCI_COMMAND    (*(volatile DWORD*)(0xE008C00C))
#define MCI_RESP_CMD   (*(volatile DWORD*)(0xE008C010))
#define MCI_RESP0      (*(volatile DWORD*)(0xE008C014))
#define MCI_RESP1      (*(volatile DWORD*)(0xE008C018))
#define MCI_RESP2      (*(volatile DWORD*)(0xE008C01C))
#define MCI_RESP3      (*(volatile DWORD*)(0xE008C020))
#define MCI_DATA_TMR   (*(volatile DWORD*)(0xE008C024))
#define MCI_DATA_LEN   (*(volatile DWORD*)(0xE008C028))
#define MCI_DATA_CTRL  (*(volatile DWORD*)(0xE008C02C))
#define MCI_DATA_CNT   (*(volatile DWORD*)(0xE008C030))
#define MCI_STATUS     (*(volatile DWORD*)(0xE008C034))
#define MCI_CLEAR      (*(volatile DWORD*)(0xE008C038))
#define MCI_MASK0      (*(volatile DWORD*)(0xE008C03C))
#define MCI_MASK1      (*(volatile DWORD*)(0xE008C040))
#define MCI_FIFO_CNT   (*(volatile DWORD*)(0xE008C048))
#define MCI_FIFO       (*(volatile DWORD*)(0xE008C080))

#define I2S_DAO			(*(volatile DWORD*)(0xE0088000))
#define I2S_DAI			(*(volatile DWORD*)(0xE0088004))
#define I2S_TX_FIFO		(*(volatile DWORD*)(0xE0088008))
#define I2S_RX_FIFO		(*(volatile DWORD*)(0xE008800C))
#define I2S_STATE		(*(volatile DWORD*)(0xE0088010))
#define I2S_DMA1		(*(volatile DWORD*)(0xE0088014))
#define I2S_DMA2		(*(volatile DWORD*)(0xE0088018))
#define I2S_IRQ			(*(volatile DWORD*)(0xE008801C))
#define I2S_TXRATE		(*(volatile DWORD*)(0xE0088020))
#define I2S_RXRATE		(*(volatile DWORD*)(0xE0088024))

#define GPDMA_INT_STAT			(*(volatile DWORD*)(0xFFE04000))
#define GPDMA_INT_TCSTAT		(*(volatile DWORD*)(0xFFE04004))
#define GPDMA_INT_TCCLR			(*(volatile DWORD*)(0xFFE04008))
#define GPDMA_INT_ERR_STAT		(*(volatile DWORD*)(0xFFE0400C))
#define GPDMA_INT_ERR_CLR		(*(volatile DWORD*)(0xFFE04010))
#define GPDMA_RAW_INT_TCSTAT	(*(volatile DWORD*)(0xFFE04014))
#define GPDMA_RAW_INT_ERR_STAT	(*(volatile DWORD*)(0xFFE04018))
#define GPDMA_ENABLED_CHNS		(*(volatile DWORD*)(0xFFE0401C))
#define GPDMA_SOFT_BREQ			(*(volatile DWORD*)(0xFFE04020))
#define GPDMA_SOFT_SREQ			(*(volatile DWORD*)(0xFFE04024))
#define GPDMA_SOFT_LBREQ		(*(volatile DWORD*)(0xFFE04028))
#define GPDMA_SOFT_LSREQ		(*(volatile DWORD*)(0xFFE0402C))
#define GPDMA_CONFIG			(*(volatile DWORD*)(0xFFE04030))
#define GPDMA_SYNC				(*(volatile DWORD*)(0xFFE04034))

#define GPDMA_CH0_SRC	(*(volatile DWORD*)(0xFFE04100))
#define GPDMA_CH0_DEST	(*(volatile DWORD*)(0xFFE04104))
#define GPDMA_CH0_LLI	(*(volatile DWORD*)(0xFFE04108))
#define GPDMA_CH0_CTRL	(*(volatile DWORD*)(0xFFE0410C))
#define GPDMA_CH0_CFG	(*(volatile DWORD*)(0xFFE04110))

#define GPDMA_CH1_SRC	(*(volatile DWORD*)(0xFFE04120))
#define GPDMA_CH1_DEST	(*(volatile DWORD*)(0xFFE04124))
#define GPDMA_CH1_LLI	(*(volatile DWORD*)(0xFFE04128))
#define GPDMA_CH1_CTRL	(*(volatile DWORD*)(0xFFE0412C))
#define GPDMA_CH1_CFG	(*(volatile DWORD*)(0xFFE04130))

#define USB_INT_STAT	(*(volatile DWORD*)(0xE01FC1C0))

#define DEV_INT_STAT	(*(volatile DWORD*)(0xFFE0C200))
#define DEV_INT_EN		(*(volatile DWORD*)(0xFFE0C204))
#define DEV_INT_CLR     (*(volatile DWORD*)(0xFFE0C208))
#define DEV_INT_SET     (*(volatile DWORD*)(0xFFE0C20C))
#define DEV_INT_PRIO    (*(volatile DWORD*)(0xFFE0C22C))

#define EP_INT_STAT		(*(volatile DWORD*)(0xFFE0C230))
#define EP_INT_EN       (*(volatile DWORD*)(0xFFE0C234))
#define EP_INT_CLR      (*(volatile DWORD*)(0xFFE0C238))
#define EP_INT_SET      (*(volatile DWORD*)(0xFFE0C23C))
#define EP_INT_PRIO     (*(volatile DWORD*)(0xFFE0C240))

#define REALIZE_EP      (*(volatile DWORD*)(0xFFE0C244))
#define EP_INDEX        (*(volatile DWORD*)(0xFFE0C248))
#define MAXPACKET_SIZE  (*(volatile DWORD*)(0xFFE0C24C))

#define CMD_CODE        (*(volatile DWORD*)(0xFFE0C210))
#define CMD_DATA        (*(volatile DWORD*)(0xFFE0C214))

#define RX_DATA			(*(volatile DWORD*)(0xFFE0C218))
#define TX_DATA			(*(volatile DWORD*)(0xFFE0C21C))
#define RX_PLENGTH		(*(volatile DWORD*)(0xFFE0C220))
#define TX_PLENGTH		(*(volatile DWORD*)(0xFFE0C224))
#define USB_CTRL		(*(volatile DWORD*)(0xFFE0C228))

#define DMA_REQ_STAT		(*(volatile DWORD*)(0xFFE0C250))
#define DMA_REQ_CLR			(*(volatile DWORD*)(0xFFE0C254))
#define DMA_REQ_SET			(*(volatile DWORD*)(0xFFE0C258))
#define UDCA_HEAD			(*(volatile DWORD*)(0xFFE0C280))
#define EP_DMA_STAT			(*(volatile DWORD*)(0xFFE0C284))
#define EP_DMA_EN			(*(volatile DWORD*)(0xFFE0C288))
#define EP_DMA_DIS			(*(volatile DWORD*)(0xFFE0C28C))
#define DMA_INT_STAT		(*(volatile DWORD*)(0xFFE0C290))
#define DMA_INT_EN			(*(volatile DWORD*)(0xFFE0C294))
#define EOT_INT_STAT		(*(volatile DWORD*)(0xFFE0C2A0))
#define EOT_INT_CLR			(*(volatile DWORD*)(0xFFE0C2A4))
#define EOT_INT_SET			(*(volatile DWORD*)(0xFFE0C2A8))
#define NDD_REQ_INT_STAT	(*(volatile DWORD*)(0xFFE0C2AC))
#define NDD_REQ_INT_CLR		(*(volatile DWORD*)(0xFFE0C2B0))
#define NDD_REQ_INT_SET		(*(volatile DWORD*)(0xFFE0C2B4))
#define SYS_ERR_INT_STAT	(*(volatile DWORD*)(0xFFE0C2B8))
#define SYS_ERR_INT_CLR		(*(volatile DWORD*)(0xFFE0C2BC))
#define SYS_ERR_INT_SET		(*(volatile DWORD*)(0xFFE0C2C0))

#define HC_REVISION			(*(volatile DWORD*)(0xFFE0C000))
#define HC_CONTROL			(*(volatile DWORD*)(0xFFE0C004))
#define HC_CMD_STAT			(*(volatile DWORD*)(0xFFE0C008))
#define HC_INT_STAT			(*(volatile DWORD*)(0xFFE0C00C))
#define HC_INT_EN			(*(volatile DWORD*)(0xFFE0C010))
#define HC_INT_DIS			(*(volatile DWORD*)(0xFFE0C014))
#define HC_HCCA				(*(volatile DWORD*)(0xFFE0C018))
#define HC_PERIOD_CUR_ED	(*(volatile DWORD*)(0xFFE0C01C))
#define HC_CTRL_HEAD_ED		(*(volatile DWORD*)(0xFFE0C020))
#define HC_CTRL_CUR_ED		(*(volatile DWORD*)(0xFFE0C024))
#define HC_BULK_HEAD_ED		(*(volatile DWORD*)(0xFFE0C028))
#define HC_BULK_CUR_ED		(*(volatile DWORD*)(0xFFE0C02C))
#define HC_DONE_HEAD		(*(volatile DWORD*)(0xFFE0C030))
#define HC_FM_INTERVAL		(*(volatile DWORD*)(0xFFE0C034))
#define HC_FM_REMAINING		(*(volatile DWORD*)(0xFFE0C038))
#define HC_FM_NUMBER		(*(volatile DWORD*)(0xFFE0C03C))
#define HC_PERIOD_START		(*(volatile DWORD*)(0xFFE0C040))
#define HC_LS_THRHLD		(*(volatile DWORD*)(0xFFE0C044))
#define HC_RH_DESCA			(*(volatile DWORD*)(0xFFE0C048))
#define HC_RH_DESCB			(*(volatile DWORD*)(0xFFE0C04C))
#define HC_RH_STAT			(*(volatile DWORD*)(0xFFE0C050))
#define HC_RH_PORT_STAT1	(*(volatile DWORD*)(0xFFE0C054))
#define HC_RH_PORT_STAT2	(*(volatile DWORD*)(0xFFE0C058))

#define OTG_INT_STAT		(*(volatile DWORD*)(0xFFE0C100))
#define OTG_INT_EN			(*(volatile DWORD*)(0xFFE0C104))
#define OTG_INT_SET			(*(volatile DWORD*)(0xFFE0C108))
#define OTG_INT_CLR			(*(volatile DWORD*)(0xFFE0C10C))
#define OTG_STAT_CTRL       (*(volatile DWORD*)(0xFFE0C110))
#define OTG_TIMER           (*(volatile DWORD*)(0xFFE0C114))

#define OTG_I2C_RX			(*(volatile DWORD*)(0xFFE0C300))
#define OTG_I2C_TX			(*(volatile DWORD*)(0xFFE0C300))
#define OTG_I2C_STS			(*(volatile DWORD*)(0xFFE0C304))
#define OTG_I2C_CTL			(*(volatile DWORD*)(0xFFE0C308))
#define OTG_I2C_CLKHI		(*(volatile DWORD*)(0xFFE0C30C))
#define OTG_I2C_CLKLO		(*(volatile DWORD*)(0xFFE0C310))

#define OTG_CLK_CTRL		(*(volatile DWORD*)(0xFFE0CFF4))
#define OTG_CLK_STAT		(*(volatile DWORD*)(0xFFE0CFF8))

#define USBPortSel			(*(volatile DWORD*)(0xFFE0C110))
#define USBClkCtrl			(*(volatile DWORD*)(0xFFE0CFF4))
#define USBClkSt			(*(volatile DWORD*)(0xFFE0CFF8))

#define MAC_MAC1			(*(volatile DWORD*)(0xFFE00000))
#define MAC_MAC2			(*(volatile DWORD*)(0xFFE00004))
#define MAC_IPGT			(*(volatile DWORD*)(0xFFE00008))
#define MAC_IPGR			(*(volatile DWORD*)(0xFFE0000C))
#define MAC_CLRT			(*(volatile DWORD*)(0xFFE00010))
#define MAC_MAXF			(*(volatile DWORD*)(0xFFE00014))
#define MAC_SUPP			(*(volatile DWORD*)(0xFFE00018))
#define MAC_TEST			(*(volatile DWORD*)(0xFFE0001C))
#define MAC_MCFG			(*(volatile DWORD*)(0xFFE00020))
#define MAC_MCMD			(*(volatile DWORD*)(0xFFE00024))
#define MAC_MADR			(*(volatile DWORD*)(0xFFE00028))
#define MAC_MWTD			(*(volatile DWORD*)(0xFFE0002C))
#define MAC_MRDD			(*(volatile DWORD*)(0xFFE00030))
#define MAC_MIND			(*(volatile DWORD*)(0xFFE00034))

#define MAC_SA0				(*(volatile DWORD*)(0xFFE00040))
#define MAC_SA1				(*(volatile DWORD*)(0xFFE00044))
#define MAC_SA2				(*(volatile DWORD*)(0xFFE00048))

#define MAC_COMMAND			(*(volatile DWORD*)(0xFFE00100))
#define MAC_STATUS			(*(volatile DWORD*)(0xFFE00104))
#define MAC_RXDESCRIPTOR	(*(volatile DWORD*)(0xFFE00108))
#define MAC_RXSTATUS		(*(volatile DWORD*)(0xFFE0010C))
#define MAC_RXDESCRIPTORNUM	(*(volatile DWORD*)(0xFFE00110))
#define MAC_RXPRODUCEINDEX	(*(volatile DWORD*)(0xFFE00114))
#define MAC_RXCONSUMEINDEX	(*(volatile DWORD*)(0xFFE00118))
#define MAC_TXDESCRIPTOR	(*(volatile DWORD*)(0xFFE0011C))
#define MAC_TXSTATUS		(*(volatile DWORD*)(0xFFE00120))
#define MAC_TXDESCRIPTORNUM	(*(volatile DWORD*)(0xFFE00124))
#define MAC_TXPRODUCEINDEX	(*(volatile DWORD*)(0xFFE00128))
#define MAC_TXCONSUMEINDEX	(*(volatile DWORD*)(0xFFE0012C))

#define MAC_TSV0			(*(volatile DWORD*)(0xFFE00158))
#define MAC_TSV1			(*(volatile DWORD*)(0xFFE0015C))
#define MAC_RSV				(*(volatile DWORD*)(0xFFE00160))

#define MAC_FLOWCONTROLCNT	(*(volatile DWORD*)(0xFFE00170))
#define MAC_FLOWCONTROLSTS	(*(volatile DWORD*)(0xFFE00174))

#define MAC_RXFILTERCTRL	(*(volatile DWORD*)(0xFFE00200))
#define MAC_RXFILTERWOLSTS	(*(volatile DWORD*)(0xFFE00204))
#define MAC_RXFILTERWOLCLR	(*(volatile DWORD*)(0xFFE00208))

#define MAC_HASHFILTERL		(*(volatile DWORD*)(0xFFE00210))
#define MAC_HASHFILTERH		(*(volatile DWORD*)(0xFFE00214))

#define MAC_INTSTATUS		(*(volatile DWORD*)(0xFFE00FE0))
#define MAC_INTENABLE		(*(volatile DWORD*)(0xFFE00FE4))
#define MAC_INTCLEAR		(*(volatile DWORD*)(0xFFE00FE8))
#define MAC_INTSET			(*(volatile DWORD*)(0xFFE00FEC))

#define MAC_POWERDOWN		(*(volatile DWORD*)(0xFFE00FF4))
#define MAC_MODULEID		(*(volatile DWORD*)(0xFFE00FFC))

#endif

