]> rtime.felk.cvut.cz Git - sysless.git/blob - arch/arm/mach-lpc178x/defines/LPC177x_8x.h
LPC178x: Add parameters for key-value storage into original header file.
[sysless.git] / arch / arm / mach-lpc178x / defines / LPC177x_8x.h
1 /**********************************************************************
2 * $Id: LPC177x_8x.h 7485 2011-06-03 07:57:16Z sgg06786 $                LPC177x_8x.h                    2011-06-02
3 *//**
4 * @file         LPC177x_8x.h
5 * @brief        Cortex-M3 Core Peripheral Access Layer Header File for
6 *                       NXP LPC177x_8x Series.
7 * @version      1.0
8 * @date         02. June. 2011
9 * @author       NXP MCU SW Application Team
10
11 * Copyright(C) 2011, NXP Semiconductor
12 * All rights reserved.
13 *
14 ***********************************************************************
15 * Software that is described herein is for illustrative purposes only
16 * which provides customers with programming information regarding the
17 * products. This software is supplied "AS IS" without any warranties.
18 * NXP Semiconductors assumes no responsibility or liability for the
19 * use of the software, conveys no license or title under any patent,
20 * copyright, or mask work right to the product. NXP Semiconductors
21 * reserves the right to make changes in the software without
22 * notification. NXP Semiconductors also make no representation or
23 * warranty that such application will be suitable for the specified
24 * use without further testing or modification.
25 **********************************************************************/
26
27 #ifndef __LPC177x_8x_H__
28 #define __LPC177x_8x_H__
29
30 ///////////////////////////////////////////////////////////////////////////////
31 // Keyval
32 #define KVPB_CHUNK_SIZE 16
33
34 ///////////////////////////////////////////////////////////////////////////////
35 // ISP_RAM2FLASH_BLOCK_SIZE for 17xx CPU
36 #ifndef ISP_RAM2FLASH_BLOCK_SIZE
37   #define ISP_RAM2FLASH_BLOCK_SIZE      256
38 #endif /* ISP_RAM2FLASH_BLOCK_SIZE */
39
40 /*
41  * ==========================================================================
42  * ---------- Interrupt Number Definition -----------------------------------
43  * ==========================================================================
44  */
45
46 typedef enum IRQn
47 {
48 /******  Cortex-M3 Processor Exceptions Numbers ***************************************************/
49   NonMaskableInt_IRQn           = -14,      /*!< 2 Non Maskable Interrupt                         */
50   MemoryManagement_IRQn         = -12,      /*!< 4 Cortex-M3 Memory Management Interrupt          */
51   BusFault_IRQn                 = -11,      /*!< 5 Cortex-M3 Bus Fault Interrupt                  */
52   UsageFault_IRQn               = -10,      /*!< 6 Cortex-M3 Usage Fault Interrupt                */
53   SVCall_IRQn                   = -5,       /*!< 11 Cortex-M3 SV Call Interrupt                   */
54   DebugMonitor_IRQn             = -4,       /*!< 12 Cortex-M3 Debug Monitor Interrupt             */
55   PendSV_IRQn                   = -2,       /*!< 14 Cortex-M3 Pend SV Interrupt                   */
56   SysTick_IRQn                  = -1,       /*!< 15 Cortex-M3 System Tick Interrupt               */
57
58 /******  LPC177x_8x Specific Interrupt Numbers *******************************************************/
59   WDT_IRQn                      = 0,        /*!< Watchdog Timer Interrupt                         */
60   TIMER0_IRQn                   = 1,        /*!< Timer0 Interrupt                                 */
61   TIMER1_IRQn                   = 2,        /*!< Timer1 Interrupt                                 */
62   TIMER2_IRQn                   = 3,        /*!< Timer2 Interrupt                                 */
63   TIMER3_IRQn                   = 4,        /*!< Timer3 Interrupt                                 */
64   UART0_IRQn                    = 5,        /*!< UART0 Interrupt                                  */
65   UART1_IRQn                    = 6,        /*!< UART1 Interrupt                                  */
66   UART2_IRQn                    = 7,        /*!< UART2 Interrupt                                  */
67   UART3_IRQn                    = 8,        /*!< UART3 Interrupt                                  */
68   PWM1_IRQn                     = 9,        /*!< PWM1 Interrupt                                   */
69   I2C0_IRQn                     = 10,       /*!< I2C0 Interrupt                                   */
70   I2C1_IRQn                     = 11,       /*!< I2C1 Interrupt                                   */
71   I2C2_IRQn                     = 12,       /*!< I2C2 Interrupt                                   */
72   Reserved0_IRQn                = 13,       /*!< Reserved                                         */
73   SSP0_IRQn                     = 14,       /*!< SSP0 Interrupt                                   */
74   SSP1_IRQn                     = 15,       /*!< SSP1 Interrupt                                   */
75   PLL0_IRQn                     = 16,       /*!< PLL0 Lock (Main PLL) Interrupt                   */
76   RTC_IRQn                      = 17,       /*!< Real Time Clock Interrupt                        */
77   EINT0_IRQn                    = 18,       /*!< External Interrupt 0 Interrupt                   */
78   EINT1_IRQn                    = 19,       /*!< External Interrupt 1 Interrupt                   */
79   EINT2_IRQn                    = 20,       /*!< External Interrupt 2 Interrupt                   */
80   EINT3_IRQn                    = 21,       /*!< External Interrupt 3 Interrupt                   */
81   ADC_IRQn                      = 22,       /*!< A/D Converter Interrupt                          */
82   BOD_IRQn                      = 23,       /*!< Brown-Out Detect Interrupt                       */
83   USB_IRQn                      = 24,       /*!< USB Interrupt                                    */
84   CAN_IRQn                      = 25,       /*!< CAN Interrupt                                    */
85   DMA_IRQn                      = 26,       /*!< General Purpose DMA Interrupt                    */
86   I2S_IRQn                      = 27,       /*!< I2S Interrupt                                    */
87   ENET_IRQn                     = 28,       /*!< Ethernet Interrupt                               */
88   MCI_IRQn                      = 29,       /*!< SD/MMC card I/F Interrupt                        */
89   MCPWM_IRQn                    = 30,       /*!< Motor Control PWM Interrupt                      */
90   QEI_IRQn                      = 31,       /*!< Quadrature Encoder Interface Interrupt           */
91   PLL1_IRQn                     = 32,       /*!< PLL1 Lock (USB PLL) Interrupt                    */
92   USBActivity_IRQn              = 33,       /*!< USB Activity interrupt                           */
93   CANActivity_IRQn              = 34,       /*!< CAN Activity interrupt                           */
94   UART4_IRQn                    = 35,       /*!< UART4 Interrupt                                  */
95   SSP2_IRQn                     = 36,       /*!< SSP2 Interrupt                                   */
96   LCD_IRQn                      = 37,       /*!< LCD Interrupt                                    */
97   GPIO_IRQn                     = 38,       /*!< GPIO Interrupt                                   */
98   PWM0_IRQn                     = 39,       /*!< PWM0 Interrupt                                   */
99   EEPROM_IRQn                   = 40,       /*!< EEPROM Interrupt                           */
100 } IRQn_Type;
101
102
103 /*
104  * ==========================================================================
105  * ----------- Processor and Core Peripheral Section ------------------------
106  * ==========================================================================
107  */
108
109 /* Configuration of the Cortex-M3 Processor and Core Peripherals */
110 #define __MPU_PRESENT             1         /*!< MPU present or not                               */
111 #define __NVIC_PRIO_BITS          5         /*!< Number of Bits used for Priority Levels          */
112 #define __Vendor_SysTickConfig    0         /*!< Set to 1 if different SysTick Config is used     */
113
114
115 #include "core_cm3.h"                       /* Cortex-M3 processor and core peripherals           */
116 //#include "system_LPC177x_8x.h"                 /* System Header                                      */
117
118
119 /******************************************************************************/
120 /*                Device Specific Peripheral registers structures             */
121 /******************************************************************************/
122
123 #if defined ( __CC_ARM   )
124 #pragma anon_unions
125 #endif
126
127 /*------------- System Control (SC) ------------------------------------------*/
128 typedef struct
129 {
130   __IO uint32_t FLASHCFG;                   /*!< Offset: 0x000 (R/W)  Flash Accelerator Configuration Register */
131        uint32_t RESERVED0[31];
132   __IO uint32_t PLL0CON;                    /*!< Offset: 0x080 (R/W)  PLL0 Control Register */
133   __IO uint32_t PLL0CFG;                    /*!< Offset: 0x084 (R/W)  PLL0 Configuration Register */
134   __I  uint32_t PLL0STAT;                   /*!< Offset: 0x088 (R/ )  PLL0 Status Register */
135   __O  uint32_t PLL0FEED;                   /*!< Offset: 0x08C ( /W)  PLL0 Feed Register */
136        uint32_t RESERVED1[4];
137   __IO uint32_t PLL1CON;                    /*!< Offset: 0x0A0 (R/W)  PLL1 Control Register */
138   __IO uint32_t PLL1CFG;                    /*!< Offset: 0x0A4 (R/W)  PLL1 Configuration Register */
139   __I  uint32_t PLL1STAT;                   /*!< Offset: 0x0A8 (R/ )  PLL1 Status Register */
140   __O  uint32_t PLL1FEED;                   /*!< Offset: 0x0AC ( /W)  PLL1 Feed Register */
141        uint32_t RESERVED2[4];
142   __IO uint32_t PCON;                       /*!< Offset: 0x0C0 (R/W)  Power Control Register */
143   __IO uint32_t PCONP;                      /*!< Offset: 0x0C4 (R/W)  Power Control for Peripherals Register */
144        uint32_t RESERVED3[14];
145   __IO uint32_t EMCCLKSEL;                  /*!< Offset: 0x100 (R/W)  External Memory Controller Clock Selection Register */
146   __IO uint32_t CCLKSEL;                    /*!< Offset: 0x104 (R/W)  CPU Clock Selection Register */
147   __IO uint32_t USBCLKSEL;                  /*!< Offset: 0x108 (R/W)  USB Clock Selection Register */
148   __IO uint32_t CLKSRCSEL;                  /*!< Offset: 0x10C (R/W)  Clock Source Select Register */
149   __IO uint32_t CANSLEEPCLR;                /*!< Offset: 0x110 (R/W)  CAN Sleep Clear Register */
150   __IO uint32_t CANWAKEFLAGS;               /*!< Offset: 0x114 (R/W)  CAN Wake-up Flags Register */
151        uint32_t RESERVED4[10];
152   __IO uint32_t EXTINT;                     /*!< Offset: 0x140 (R/W)  External Interrupt Flag Register */
153        uint32_t RESERVED5[1];
154   __IO uint32_t EXTMODE;                    /*!< Offset: 0x148 (R/W)  External Interrupt Mode Register */
155   __IO uint32_t EXTPOLAR;                   /*!< Offset: 0x14C (R/W)  External Interrupt Polarity Register */
156        uint32_t RESERVED6[12];
157   __IO uint32_t RSID;                       /*!< Offset: 0x180 (R/W)  Reset Source Identification Register */
158        uint32_t RESERVED7[7];
159   __IO uint32_t SCS;                        /*!< Offset: 0x1A0 (R/W)  System Controls and Status Register */
160   __IO uint32_t IRCTRIM;                    /*!< Offset: 0x1A4 (R/W) Clock Dividers                     */
161   __IO uint32_t PCLKSEL;                    /*!< Offset: 0x1A8 (R/W)  Peripheral Clock Selection Register */
162        uint32_t RESERVED8[3];
163   __IO uint32_t LCD_CFG;                    /*!< Offset: 0x1B8 (R/W)  LCD Configuration and clocking control Register */
164        uint32_t RESERVED9[1];
165   __IO uint32_t USBIntSt;                   /*!< Offset: 0x1C0 (R/W)  USB Interrupt Status Register */
166   __IO uint32_t DMAREQSEL;                  /*!< Offset: 0x1C4 (R/W)  DMA Request Select Register */
167   __IO uint32_t CLKOUTCFG;                  /*!< Offset: 0x1C8 (R/W)  Clock Output Configuration Register */
168   __IO uint32_t RSTCON0;                    /*!< Offset: 0x1CC (R/W)  RESET Control0 Register */
169   __IO uint32_t RSTCON1;                    /*!< Offset: 0x1D0 (R/W)  RESET Control1 Register */
170        uint32_t RESERVED10[2];
171   __IO uint32_t EMCDLYCTL;                  /*!< Offset: 0x1DC (R/W) SDRAM programmable delays          */
172   __IO uint32_t EMCCAL;                     /*!< Offset: 0x1E0 (R/W) Calibration of programmable delays */
173  } LPC_SC_TypeDef;
174
175 /*------------- Pin Connect Block (PINCON) -----------------------------------*/
176 typedef struct
177 {
178   __IO uint32_t P0_0;                           /* 0x000 */
179   __IO uint32_t P0_1;
180   __IO uint32_t P0_2;
181   __IO uint32_t P0_3;
182   __IO uint32_t P0_4;
183   __IO uint32_t P0_5;
184   __IO uint32_t P0_6;
185   __IO uint32_t P0_7;
186
187   __IO uint32_t P0_8;                           /* 0x020 */
188   __IO uint32_t P0_9;
189   __IO uint32_t P0_10;
190   __IO uint32_t P0_11;
191   __IO uint32_t P0_12;
192   __IO uint32_t P0_13;
193   __IO uint32_t P0_14;
194   __IO uint32_t P0_15;
195
196   __IO uint32_t P0_16;                          /* 0x040 */
197   __IO uint32_t P0_17;
198   __IO uint32_t P0_18;
199   __IO uint32_t P0_19;
200   __IO uint32_t P0_20;
201   __IO uint32_t P0_21;
202   __IO uint32_t P0_22;
203   __IO uint32_t P0_23;
204
205   __IO uint32_t P0_24;                          /* 0x060 */
206   __IO uint32_t P0_25;
207   __IO uint32_t P0_26;
208   __IO uint32_t P0_27;
209   __IO uint32_t P0_28;
210   __IO uint32_t P0_29;
211   __IO uint32_t P0_30;
212   __IO uint32_t P0_31;
213
214   __IO uint32_t P1_0;                           /* 0x080 */
215   __IO uint32_t P1_1;
216   __IO uint32_t P1_2;
217   __IO uint32_t P1_3;
218   __IO uint32_t P1_4;
219   __IO uint32_t P1_5;
220   __IO uint32_t P1_6;
221   __IO uint32_t P1_7;
222
223   __IO uint32_t P1_8;                           /* 0x0A0 */
224   __IO uint32_t P1_9;
225   __IO uint32_t P1_10;
226   __IO uint32_t P1_11;
227   __IO uint32_t P1_12;
228   __IO uint32_t P1_13;
229   __IO uint32_t P1_14;
230   __IO uint32_t P1_15;
231
232   __IO uint32_t P1_16;                          /* 0x0C0 */
233   __IO uint32_t P1_17;
234   __IO uint32_t P1_18;
235   __IO uint32_t P1_19;
236   __IO uint32_t P1_20;
237   __IO uint32_t P1_21;
238   __IO uint32_t P1_22;
239   __IO uint32_t P1_23;
240
241   __IO uint32_t P1_24;                          /* 0x0E0 */
242   __IO uint32_t P1_25;
243   __IO uint32_t P1_26;
244   __IO uint32_t P1_27;
245   __IO uint32_t P1_28;
246   __IO uint32_t P1_29;
247   __IO uint32_t P1_30;
248   __IO uint32_t P1_31;
249
250   __IO uint32_t P2_0;                           /* 0x100 */
251   __IO uint32_t P2_1;
252   __IO uint32_t P2_2;
253   __IO uint32_t P2_3;
254   __IO uint32_t P2_4;
255   __IO uint32_t P2_5;
256   __IO uint32_t P2_6;
257   __IO uint32_t P2_7;
258
259   __IO uint32_t P2_8;                           /* 0x120 */
260   __IO uint32_t P2_9;
261   __IO uint32_t P2_10;
262   __IO uint32_t P2_11;
263   __IO uint32_t P2_12;
264   __IO uint32_t P2_13;
265   __IO uint32_t P2_14;
266   __IO uint32_t P2_15;
267
268   __IO uint32_t P2_16;                          /* 0x140 */
269   __IO uint32_t P2_17;
270   __IO uint32_t P2_18;
271   __IO uint32_t P2_19;
272   __IO uint32_t P2_20;
273   __IO uint32_t P2_21;
274   __IO uint32_t P2_22;
275   __IO uint32_t P2_23;
276
277   __IO uint32_t P2_24;                          /* 0x160 */
278   __IO uint32_t P2_25;
279   __IO uint32_t P2_26;
280   __IO uint32_t P2_27;
281   __IO uint32_t P2_28;
282   __IO uint32_t P2_29;
283   __IO uint32_t P2_30;
284   __IO uint32_t P2_31;
285
286   __IO uint32_t P3_0;                           /* 0x180 */
287   __IO uint32_t P3_1;
288   __IO uint32_t P3_2;
289   __IO uint32_t P3_3;
290   __IO uint32_t P3_4;
291   __IO uint32_t P3_5;
292   __IO uint32_t P3_6;
293   __IO uint32_t P3_7;
294
295   __IO uint32_t P3_8;                           /* 0x1A0 */
296   __IO uint32_t P3_9;
297   __IO uint32_t P3_10;
298   __IO uint32_t P3_11;
299   __IO uint32_t P3_12;
300   __IO uint32_t P3_13;
301   __IO uint32_t P3_14;
302   __IO uint32_t P3_15;
303
304   __IO uint32_t P3_16;                          /* 0x1C0 */
305   __IO uint32_t P3_17;
306   __IO uint32_t P3_18;
307   __IO uint32_t P3_19;
308   __IO uint32_t P3_20;
309   __IO uint32_t P3_21;
310   __IO uint32_t P3_22;
311   __IO uint32_t P3_23;
312
313   __IO uint32_t P3_24;                          /* 0x1E0 */
314   __IO uint32_t P3_25;
315   __IO uint32_t P3_26;
316   __IO uint32_t P3_27;
317   __IO uint32_t P3_28;
318   __IO uint32_t P3_29;
319   __IO uint32_t P3_30;
320   __IO uint32_t P3_31;
321
322   __IO uint32_t P4_0;                           /* 0x200 */
323   __IO uint32_t P4_1;
324   __IO uint32_t P4_2;
325   __IO uint32_t P4_3;
326   __IO uint32_t P4_4;
327   __IO uint32_t P4_5;
328   __IO uint32_t P4_6;
329   __IO uint32_t P4_7;
330
331   __IO uint32_t P4_8;                           /* 0x220 */
332   __IO uint32_t P4_9;
333   __IO uint32_t P4_10;
334   __IO uint32_t P4_11;
335   __IO uint32_t P4_12;
336   __IO uint32_t P4_13;
337   __IO uint32_t P4_14;
338   __IO uint32_t P4_15;
339
340   __IO uint32_t P4_16;                          /* 0x240 */
341   __IO uint32_t P4_17;
342   __IO uint32_t P4_18;
343   __IO uint32_t P4_19;
344   __IO uint32_t P4_20;
345   __IO uint32_t P4_21;
346   __IO uint32_t P4_22;
347   __IO uint32_t P4_23;
348
349   __IO uint32_t P4_24;                          /* 0x260 */
350   __IO uint32_t P4_25;
351   __IO uint32_t P4_26;
352   __IO uint32_t P4_27;
353   __IO uint32_t P4_28;
354   __IO uint32_t P4_29;
355   __IO uint32_t P4_30;
356   __IO uint32_t P4_31;
357
358   __IO uint32_t P5_0;                           /* 0x280 */
359   __IO uint32_t P5_1;
360   __IO uint32_t P5_2;
361   __IO uint32_t P5_3;
362   __IO uint32_t P5_4;                           /* 0x290 */
363 } LPC_IOCON_TypeDef;
364
365 /*------------- General Purpose Input/Output (GPIO) --------------------------*/
366 typedef struct
367 {
368   __IO uint32_t DIR;
369        uint32_t RESERVED0[3];
370   __IO uint32_t MASK;
371   __IO uint32_t PIN;
372   __IO uint32_t SET;
373   __O  uint32_t CLR;
374 } LPC_GPIO_TypeDef;
375
376 typedef struct
377 {
378   __I  uint32_t IntStatus;
379   __I  uint32_t IO0IntStatR;
380   __I  uint32_t IO0IntStatF;
381   __O  uint32_t IO0IntClr;
382   __IO uint32_t IO0IntEnR;
383   __IO uint32_t IO0IntEnF;
384        uint32_t RESERVED0[3];
385   __I  uint32_t IO2IntStatR;
386   __I  uint32_t IO2IntStatF;
387   __O  uint32_t IO2IntClr;
388   __IO uint32_t IO2IntEnR;
389   __IO uint32_t IO2IntEnF;
390 } LPC_GPIOINT_TypeDef;
391
392 /*------------- Timer (TIM) --------------------------------------------------*/
393 typedef struct
394 {
395   __IO uint32_t IR;                     /*!< Offset: 0x000 Interrupt Register (R/W) */
396   __IO uint32_t TCR;                    /*!< Offset: 0x004 Timer Control Register (R/W) */
397   __IO uint32_t TC;                     /*!< Offset: 0x008 Timer Counter Register (R/W) */
398   __IO uint32_t PR;                     /*!< Offset: 0x00C Prescale Register (R/W) */
399   __IO uint32_t PC;                     /*!< Offset: 0x010 Prescale Counter Register (R/W) */
400   __IO uint32_t MCR;                    /*!< Offset: 0x014 Match Control Register (R/W) */
401   __IO uint32_t MR0;                    /*!< Offset: 0x018 Match Register 0 (R/W) */
402   __IO uint32_t MR1;                    /*!< Offset: 0x01C Match Register 1 (R/W) */
403   __IO uint32_t MR2;                    /*!< Offset: 0x020 Match Register 2 (R/W) */
404   __IO uint32_t MR3;                    /*!< Offset: 0x024 Match Register 3 (R/W) */
405   __IO uint32_t CCR;                    /*!< Offset: 0x028 Capture Control Register (R/W) */
406   __I  uint32_t CR0;                    /*!< Offset: 0x02C Capture Register 0 (R/ ) */
407   __I  uint32_t CR1;                                    /*!< Offset: 0x030 Capture Register 1 (R/ ) */
408        uint32_t RESERVED0[2];
409   __IO uint32_t EMR;                    /*!< Offset: 0x03C External Match Register (R/W) */
410        uint32_t RESERVED1[12];
411   __IO uint32_t CTCR;                   /*!< Offset: 0x070 Count Control Register (R/W) */
412 } LPC_TIM_TypeDef;
413
414 /*------------- Pulse-Width Modulation (PWM) ---------------------------------*/
415 typedef struct
416 {
417   __IO uint32_t IR;                     /*!< Offset: 0x000 Interrupt Register (R/W) */
418   __IO uint32_t TCR;                    /*!< Offset: 0x004 Timer Control Register (R/W) */
419   __IO uint32_t TC;                     /*!< Offset: 0x008 Timer Counter Register (R/W) */
420   __IO uint32_t PR;                     /*!< Offset: 0x00C Prescale Register (R/W) */
421   __IO uint32_t PC;                     /*!< Offset: 0x010 Prescale Counter Register (R/W) */
422   __IO uint32_t MCR;                    /*!< Offset: 0x014 Match Control Register (R/W) */
423   __IO uint32_t MR0;                    /*!< Offset: 0x018 Match Register 0 (R/W) */
424   __IO uint32_t MR1;                    /*!< Offset: 0x01C Match Register 1 (R/W) */
425   __IO uint32_t MR2;                    /*!< Offset: 0x020 Match Register 2 (R/W) */
426   __IO uint32_t MR3;                    /*!< Offset: 0x024 Match Register 3 (R/W) */
427   __IO uint32_t CCR;                    /*!< Offset: 0x028 Capture Control Register (R/W) */
428   __I  uint32_t CR0;                    /*!< Offset: 0x02C Capture Register 0 (R/ ) */
429   __I  uint32_t CR1;                                    /*!< Offset: 0x030 Capture Register 1 (R/ ) */
430   __I  uint32_t CR2;                                    /*!< Offset: 0x034 Capture Register 2 (R/ ) */
431   __I  uint32_t CR3;                                    /*!< Offset: 0x038 Capture Register 3 (R/ ) */
432        uint32_t RESERVED0;
433   __IO uint32_t MR4;                                    /*!< Offset: 0x040 Match Register 4 (R/W) */
434   __IO uint32_t MR5;                                    /*!< Offset: 0x044 Match Register 5 (R/W) */
435   __IO uint32_t MR6;                                    /*!< Offset: 0x048 Match Register 6 (R/W) */
436   __IO uint32_t PCR;                                    /*!< Offset: 0x04C PWM Control Register (R/W) */
437   __IO uint32_t LER;                                    /*!< Offset: 0x050 Load Enable Register (R/W) */
438        uint32_t RESERVED1[7];
439   __IO uint32_t CTCR;                                   /*!< Offset: 0x070 Counter Control Register (R/W) */
440 } LPC_PWM_TypeDef;
441
442 /*------------- Universal Asynchronous Receiver Transmitter (UARTx) -----------*/
443 /* There are three types of UARTs on the chip:
444 (1) UART0,UART2, and UART3 are the standard UART.
445 (2) UART1 is the standard with modem capability.
446 (3) USART(UART4) is the sync/async UART with smart card capability.
447 More details can be found on the Users Manual. */
448
449 #if 0
450 typedef struct
451 {
452   union {
453   __I  uint8_t  RBR;
454   __O  uint8_t  THR;
455   __IO uint8_t  DLL;
456        uint32_t RESERVED0;
457   };
458   union {
459   __IO uint8_t  DLM;
460   __IO uint32_t IER;
461   };
462   union {
463   __I  uint32_t IIR;
464   __O  uint8_t  FCR;
465   };
466   __IO uint8_t  LCR;
467        uint8_t  RESERVED1[7];
468   __I  uint8_t  LSR;
469        uint8_t  RESERVED2[7];
470   __IO uint8_t  SCR;
471        uint8_t  RESERVED3[3];
472   __IO uint32_t ACR;
473   __IO uint8_t  ICR;
474        uint8_t  RESERVED4[3];
475   __IO uint8_t  FDR;
476        uint8_t  RESERVED5[7];
477   __IO uint8_t  TER;
478        uint8_t  RESERVED6[39];
479   __I  uint8_t  FIFOLVL;
480 } LPC_UART_TypeDef;
481 #else
482 typedef struct
483 {
484         union
485         {
486                 __I  uint8_t  RBR;
487                 __O  uint8_t  THR;
488                 __IO uint8_t  DLL;
489                 uint32_t RESERVED0;
490         };
491         union
492         {
493                 __IO uint8_t  DLM;
494                 __IO uint32_t IER;
495         };
496         union
497         {
498                 __I  uint32_t IIR;
499                 __O  uint8_t  FCR;
500         };
501         __IO uint8_t  LCR;
502         uint8_t  RESERVED1[7];//Reserved
503         __I  uint8_t  LSR;
504         uint8_t  RESERVED2[7];//Reserved
505         __IO uint8_t  SCR;
506         uint8_t  RESERVED3[3];//Reserved
507         __IO uint32_t ACR;
508         __IO uint8_t  ICR;
509         uint8_t  RESERVED4[3];//Reserved
510         __IO uint8_t  FDR;
511         uint8_t  RESERVED5[7];//Reserved
512         __IO uint8_t  TER;
513         uint8_t  RESERVED8[27];//Reserved
514         __IO uint8_t  RS485CTRL;
515         uint8_t  RESERVED9[3];//Reserved
516         __IO uint8_t  ADRMATCH;
517         uint8_t  RESERVED10[3];//Reserved
518         __IO uint8_t  RS485DLY;
519         uint8_t  RESERVED11[3];//Reserved
520         __I  uint8_t  FIFOLVL;
521 }LPC_UART_TypeDef;
522 #endif
523
524
525 typedef struct
526 {
527   union {
528   __I  uint8_t  RBR;
529   __O  uint8_t  THR;
530   __IO uint8_t  DLL;
531        uint32_t RESERVED0;
532   };
533   union {
534   __IO uint8_t  DLM;
535   __IO uint32_t IER;
536   };
537   union {
538   __I  uint32_t IIR;
539   __O  uint8_t  FCR;
540   };
541   __IO uint8_t  LCR;
542        uint8_t  RESERVED1[3];
543   __IO uint8_t  MCR;
544        uint8_t  RESERVED2[3];
545   __I  uint8_t  LSR;
546        uint8_t  RESERVED3[3];
547   __I  uint8_t  MSR;
548        uint8_t  RESERVED4[3];
549   __IO uint8_t  SCR;
550        uint8_t  RESERVED5[3];
551   __IO uint32_t ACR;
552        uint32_t RESERVED6;
553   __IO uint32_t FDR;
554        uint32_t RESERVED7;
555   __IO uint8_t  TER;
556        uint8_t  RESERVED8[27];
557   __IO uint8_t  RS485CTRL;
558        uint8_t  RESERVED9[3];
559   __IO uint8_t  ADRMATCH;
560        uint8_t  RESERVED10[3];
561   __IO uint8_t  RS485DLY;
562        uint8_t  RESERVED11[3];
563   __I  uint8_t  FIFOLVL;
564 } LPC_UART1_TypeDef;
565
566 typedef struct
567 {
568   union {
569   __I  uint32_t  RBR;                   /*!< Offset: 0x000 Receiver Buffer  Register (R/ ) */
570   __O  uint32_t  THR;                   /*!< Offset: 0x000 Transmit Holding Register ( /W) */
571   __IO uint32_t  DLL;                   /*!< Offset: 0x000 Divisor Latch LSB (R/W) */
572   };
573   union {
574   __IO uint32_t  DLM;                   /*!< Offset: 0x004 Divisor Latch MSB (R/W) */
575   __IO uint32_t  IER;                   /*!< Offset: 0x000 Interrupt Enable Register (R/W) */
576   };
577   union {
578   __I  uint32_t  IIR;                   /*!< Offset: 0x008 Interrupt ID Register (R/ ) */
579   __O  uint32_t  FCR;                   /*!< Offset: 0x008 FIFO Control Register ( /W) */
580   };
581   __IO uint32_t  LCR;                   /*!< Offset: 0x00C Line Control Register (R/W) */
582   __IO uint32_t  MCR;                   /*!< Offset: 0x010 Modem control Register (R/W) */
583   __I  uint32_t  LSR;                   /*!< Offset: 0x014 Line Status Register (R/ ) */
584   __I  uint32_t  MSR;                   /*!< Offset: 0x018 Modem status Register (R/ ) */
585   __IO uint32_t  SCR;                   /*!< Offset: 0x01C Scratch Pad Register (R/W) */
586   __IO uint32_t  ACR;                   /*!< Offset: 0x020 Auto-baud Control Register (R/W) */
587   __IO uint32_t  ICR;                   /*!< Offset: 0x024 irDA Control Register (R/W) */
588   __IO uint32_t  FDR;                   /*!< Offset: 0x028 Fractional Divider Register (R/W) */
589   __IO uint32_t  OSR;                   /*!< Offset: 0x02C Over sampling Register (R/W) */
590   __O  uint32_t  POP;                   /*!< Offset: 0x030 NHP Pop Register (W) */
591   __IO uint32_t  MODE;                  /*!< Offset: 0x034 NHP Mode selection Register (W) */
592        uint32_t  RESERVED0[2];
593   __IO uint32_t  HDEN;                  /*!< Offset: 0x040 Half duplex Enable Register (R/W) */
594        uint32_t  RESERVED1;
595   __IO uint32_t  SCI_CTRL;                              /*!< Offset: 0x048 Smart card Interface Control Register (R/W) */
596   __IO uint32_t  RS485CTRL;             /*!< Offset: 0x04C RS-485/EIA-485 Control Register (R/W) */
597   __IO uint32_t  ADRMATCH;              /*!< Offset: 0x050 RS-485/EIA-485 address match Register (R/W) */
598   __IO uint32_t  RS485DLY;              /*!< Offset: 0x054 RS-485/EIA-485 direction control delay Register (R/W) */
599   __IO uint32_t  SYNCCTRL;              /*!< Offset: 0x058 Synchronous Mode Control Register (R/W ) */
600   __IO uint32_t  TER;                   /*!< Offset: 0x05C Transmit Enable Register (R/W) */
601        uint32_t  RESERVED2[989];
602   __I  uint32_t  CFG;                   /*!< Offset: 0xFD4 Configuration Register (R) */
603   __O  uint32_t  INTCE;                 /*!< Offset: 0xFD8 Interrupt Clear Enable Register (W) */
604   __O  uint32_t  INTSE;                 /*!< Offset: 0xFDC Interrupt Set Enable Register (W) */
605   __I  uint32_t  INTS;                  /*!< Offset: 0xFE0 Interrupt Status Register (R) */
606   __I  uint32_t  INTE;                  /*!< Offset: 0xFE4 Interrupt Enable Register (R) */
607   __O  uint32_t  INTCS;                 /*!< Offset: 0xFE8 Interrupt Clear Status Register (W) */
608   __O  uint32_t  INTSS;                 /*!< Offset: 0xFEC Interrupt Set Status Register (W) */
609        uint32_t  RESERVED3[3];
610   __I  uint32_t  MID;                   /*!< Offset: 0xFFC Module Identification Register (R) */
611 } LPC_UART4_TypeDef;
612
613 /*------------- Synchronous Serial Communication (SSP) -----------------------*/
614 typedef struct
615 {
616   __IO uint32_t CR0;                    /*!< Offset: 0x000 Control Register 0 (R/W) */
617   __IO uint32_t CR1;                    /*!< Offset: 0x004 Control Register 1 (R/W) */
618   __IO uint32_t DR;                     /*!< Offset: 0x008 Data Register (R/W) */
619   __I  uint32_t SR;                     /*!< Offset: 0x00C Status Registe (R/ ) */
620   __IO uint32_t CPSR;                   /*!< Offset: 0x010 Clock Prescale Register (R/W) */
621   __IO uint32_t IMSC;                   /*!< Offset: 0x014 Interrupt Mask Set and Clear Register (R/W) */
622   __IO uint32_t RIS;                    /*!< Offset: 0x018 Raw Interrupt Status Register (R/W) */
623   __IO uint32_t MIS;                    /*!< Offset: 0x01C Masked Interrupt Status Register (R/W) */
624   __IO uint32_t ICR;                    /*!< Offset: 0x020 SSPICR Interrupt Clear Register (R/W) */
625   __IO uint32_t DMACR;
626 } LPC_SSP_TypeDef;
627
628 /*------------- Inter-Integrated Circuit (I2C) -------------------------------*/
629 typedef struct
630 {
631   __IO uint32_t CONSET;                 /*!< Offset: 0x000 I2C Control Set Register (R/W) */
632   __I  uint32_t STAT;                   /*!< Offset: 0x004 I2C Status Register (R/ ) */
633   __IO uint32_t DAT;                    /*!< Offset: 0x008 I2C Data Register (R/W) */
634   __IO uint32_t ADR0;                   /*!< Offset: 0x00C I2C Slave Address Register 0 (R/W) */
635   __IO uint32_t SCLH;                   /*!< Offset: 0x010 SCH Duty Cycle Register High Half Word (R/W) */
636   __IO uint32_t SCLL;                   /*!< Offset: 0x014 SCL Duty Cycle Register Low Half Word (R/W) */
637   __O  uint32_t CONCLR;                 /*!< Offset: 0x018 I2C Control Clear Register ( /W) */
638   __IO uint32_t MMCTRL;                 /*!< Offset: 0x01C Monitor mode control register (R/W) */
639   __IO uint32_t ADR1;                   /*!< Offset: 0x020 I2C Slave Address Register 1 (R/W) */
640   __IO uint32_t ADR2;                   /*!< Offset: 0x024 I2C Slave Address Register 2 (R/W) */
641   __IO uint32_t ADR3;                   /*!< Offset: 0x028 I2C Slave Address Register 3 (R/W) */
642   __I  uint32_t DATA_BUFFER;            /*!< Offset: 0x02C Data buffer register ( /W) */
643   __IO uint32_t MASK0;                  /*!< Offset: 0x030 I2C Slave address mask register 0 (R/W) */
644   __IO uint32_t MASK1;                  /*!< Offset: 0x034 I2C Slave address mask register 1 (R/W) */
645   __IO uint32_t MASK2;                  /*!< Offset: 0x038 I2C Slave address mask register 2 (R/W) */
646   __IO uint32_t MASK3;                  /*!< Offset: 0x03C I2C Slave address mask register 3 (R/W) */
647 } LPC_I2C_TypeDef;
648
649 /*------------- Inter IC Sound (I2S) -----------------------------------------*/
650 typedef struct
651 {
652   __IO uint32_t DAO;
653   __IO uint32_t DAI;
654   __O  uint32_t TXFIFO;
655   __I  uint32_t RXFIFO;
656   __I  uint32_t STATE;
657   __IO uint32_t DMA1;
658   __IO uint32_t DMA2;
659   __IO uint32_t IRQ;
660   __IO uint32_t TXRATE;
661   __IO uint32_t RXRATE;
662   __IO uint32_t TXBITRATE;
663   __IO uint32_t RXBITRATE;
664   __IO uint32_t TXMODE;
665   __IO uint32_t RXMODE;
666 } LPC_I2S_TypeDef;
667
668 /*------------- Real-Time Clock (RTC) ----------------------------------------*/
669 typedef struct
670 {
671   __IO uint8_t  ILR;
672        uint8_t  RESERVED0[7];
673   __IO uint8_t  CCR;
674        uint8_t  RESERVED1[3];
675   __IO uint8_t  CIIR;
676        uint8_t  RESERVED2[3];
677   __IO uint8_t  AMR;
678        uint8_t  RESERVED3[3];
679   __I  uint32_t CTIME0;
680   __I  uint32_t CTIME1;
681   __I  uint32_t CTIME2;
682   __IO uint8_t  SEC;
683        uint8_t  RESERVED4[3];
684   __IO uint8_t  MIN;
685        uint8_t  RESERVED5[3];
686   __IO uint8_t  HOUR;
687        uint8_t  RESERVED6[3];
688   __IO uint8_t  DOM;
689        uint8_t  RESERVED7[3];
690   __IO uint8_t  DOW;
691        uint8_t  RESERVED8[3];
692   __IO uint16_t DOY;
693        uint16_t RESERVED9;
694   __IO uint8_t  MONTH;
695        uint8_t  RESERVED10[3];
696   __IO uint16_t YEAR;
697        uint16_t RESERVED11;
698   __IO uint32_t CALIBRATION;
699   __IO uint32_t GPREG0;
700   __IO uint32_t GPREG1;
701   __IO uint32_t GPREG2;
702   __IO uint32_t GPREG3;
703   __IO uint32_t GPREG4;
704   __IO uint8_t  RTC_AUXEN;
705        uint8_t  RESERVED12[3];
706   __IO uint8_t  RTC_AUX;
707        uint8_t  RESERVED13[3];
708   __IO uint8_t  ALSEC;
709        uint8_t  RESERVED14[3];
710   __IO uint8_t  ALMIN;
711        uint8_t  RESERVED15[3];
712   __IO uint8_t  ALHOUR;
713        uint8_t  RESERVED16[3];
714   __IO uint8_t  ALDOM;
715        uint8_t  RESERVED17[3];
716   __IO uint8_t  ALDOW;
717        uint8_t  RESERVED18[3];
718   __IO uint16_t ALDOY;
719        uint16_t RESERVED19;
720   __IO uint8_t  ALMON;
721        uint8_t  RESERVED20[3];
722   __IO uint16_t ALYEAR;
723        uint16_t RESERVED21;
724   __IO uint32_t ERSTATUS;
725   __IO uint32_t ERCONTROL;
726   __IO uint32_t ERCOUNTERS;
727        uint32_t RESERVED22;
728   __IO uint32_t ERFIRSTSTAMP0;
729   __IO uint32_t ERFIRSTSTAMP1;
730   __IO uint32_t ERFIRSTSTAMP2;
731        uint32_t RESERVED23;
732   __IO uint32_t ERLASTSTAMP0;
733   __IO uint32_t ERLASTSTAMP1;
734   __IO uint32_t ERLASTSTAMP2;
735 } LPC_RTC_TypeDef;
736
737 /*------------- Watchdog Timer (WDT) -----------------------------------------*/
738 typedef struct
739 {
740   __IO uint8_t  MOD;
741        uint8_t  RESERVED0[3];
742   __IO uint32_t TC;
743   __O  uint8_t  FEED;
744        uint8_t  RESERVED1[3];
745   __I  uint32_t TV;
746        uint32_t RESERVED2;
747   __IO uint32_t WARNINT;
748   __IO uint32_t WINDOW;
749 } LPC_WDT_TypeDef;
750
751 /*------------- Analog-to-Digital Converter (ADC) ----------------------------*/
752 typedef struct
753 {
754   __IO uint32_t CR;                     /*!< Offset: 0x000       A/D Control Register (R/W) */
755   __IO uint32_t GDR;                    /*!< Offset: 0x004       A/D Global Data Register (R/W) */
756        uint32_t RESERVED0;
757   __IO uint32_t INTEN;                  /*!< Offset: 0x00C       A/D Interrupt Enable Register (R/W) */
758   __IO uint32_t DR[8];                  /*!< Offset: 0x010-0x02C A/D Channel 0..7 Data Register (R/W) */
759   __I  uint32_t STAT;                   /*!< Offset: 0x030       A/D Status Register (R/ ) */
760   __IO uint32_t ADTRM;
761 } LPC_ADC_TypeDef;
762
763 /*------------- Digital-to-Analog Converter (DAC) ----------------------------*/
764 typedef struct
765 {
766   __IO uint32_t CR;
767   __IO uint32_t CTRL;
768   __IO uint32_t CNTVAL;
769 } LPC_DAC_TypeDef;
770
771 /*------------- Motor Control Pulse-Width Modulation (MCPWM) -----------------*/
772 typedef struct
773 {
774   __I  uint32_t CON;
775   __O  uint32_t CON_SET;
776   __O  uint32_t CON_CLR;
777   __I  uint32_t CAPCON;
778   __O  uint32_t CAPCON_SET;
779   __O  uint32_t CAPCON_CLR;
780   __IO uint32_t TC0;
781   __IO uint32_t TC1;
782   __IO uint32_t TC2;
783   __IO uint32_t LIM0;
784   __IO uint32_t LIM1;
785   __IO uint32_t LIM2;
786   __IO uint32_t MAT0;
787   __IO uint32_t MAT1;
788   __IO uint32_t MAT2;
789   __IO uint32_t DT;
790   __IO uint32_t CP;
791   __IO uint32_t CAP0;
792   __IO uint32_t CAP1;
793   __IO uint32_t CAP2;
794   __I  uint32_t INTEN;
795   __O  uint32_t INTEN_SET;
796   __O  uint32_t INTEN_CLR;
797   __I  uint32_t CNTCON;
798   __O  uint32_t CNTCON_SET;
799   __O  uint32_t CNTCON_CLR;
800   __I  uint32_t INTF;
801   __O  uint32_t INTF_SET;
802   __O  uint32_t INTF_CLR;
803   __O  uint32_t CAP_CLR;
804 } LPC_MCPWM_TypeDef;
805
806 /*------------- Quadrature Encoder Interface (QEI) ---------------------------*/
807 typedef struct
808 {
809   __O  uint32_t CON;
810   __I  uint32_t STAT;
811   __IO uint32_t CONF;
812   __I  uint32_t POS;
813   __IO uint32_t MAXPOS;
814   __IO uint32_t CMPOS0;
815   __IO uint32_t CMPOS1;
816   __IO uint32_t CMPOS2;
817   __I  uint32_t INXCNT;
818   __IO uint32_t INXCMP0;
819   __IO uint32_t LOAD;
820   __I  uint32_t TIME;
821   __I  uint32_t VEL;
822   __I  uint32_t CAP;
823   __IO uint32_t VELCOMP;
824   __IO uint32_t FILTERPHA;
825   __IO uint32_t FILTERPHB;
826   __IO uint32_t FILTERINX;
827   __IO uint32_t WINDOW;
828   __IO uint32_t INXCMP1;
829   __IO uint32_t INXCMP2;
830        uint32_t RESERVED0[993];
831   __O  uint32_t IEC;
832   __O  uint32_t IES;
833   __I  uint32_t INTSTAT;
834   __I  uint32_t IE;
835   __O  uint32_t CLR;
836   __O  uint32_t SET;
837 } LPC_QEI_TypeDef;
838
839 /*------------- SD/MMC card Interface (MCI)-----------------------------------*/
840 typedef struct
841 {
842   __IO uint32_t POWER;
843   __IO uint32_t CLOCK;
844   __IO uint32_t ARGUMENT;
845   __IO uint32_t COMMAND;
846   __I  uint32_t RESP_CMD;
847   __I  uint32_t RESP0;
848   __I  uint32_t RESP1;
849   __I  uint32_t RESP2;
850   __I  uint32_t RESP3;
851   __IO uint32_t DATATMR;
852   __IO uint32_t DATALEN;
853   __IO uint32_t DATACTRL;
854   __I  uint32_t DATACNT;
855   __I  uint32_t STATUS;
856   __O  uint32_t CLEAR;
857   __IO uint32_t MASK0;
858        uint32_t RESERVED0[2];
859   __I  uint32_t FIFOCNT;
860        uint32_t RESERVED1[13];
861   __IO uint32_t FIFO;
862 } LPC_MCI_TypeDef;
863
864 /*------------- Controller Area Network (CAN) --------------------------------*/
865 typedef struct
866 {
867   __IO uint32_t mask[512];              /* ID Masks                           */
868 } LPC_CANAF_RAM_TypeDef;
869
870 typedef struct                          /* Acceptance Filter Registers        */
871 {
872         ///Offset: 0x00000000 - Acceptance Filter Register
873         __IO uint32_t AFMR;
874
875         ///Offset: 0x00000004 - Standard Frame Individual Start Address Register
876         __IO uint32_t SFF_sa;
877
878         ///Offset: 0x00000008 - Standard Frame Group Start Address Register
879         __IO uint32_t SFF_GRP_sa;
880
881         ///Offset: 0x0000000C - Extended Frame Start Address Register
882         __IO uint32_t EFF_sa;
883
884         ///Offset: 0x00000010 - Extended Frame Group Start Address Register
885         __IO uint32_t EFF_GRP_sa;
886
887         ///Offset: 0x00000014 - End of AF Tables register
888         __IO uint32_t ENDofTable;
889
890         ///Offset: 0x00000018 - LUT Error Address register
891         __I  uint32_t LUTerrAd;
892
893         ///Offset: 0x0000001C - LUT Error Register
894         __I  uint32_t LUTerr;
895
896         ///Offset: 0x00000020 - CAN Central Transmit Status Register
897         __IO uint32_t FCANIE;
898
899         ///Offset: 0x00000024 - FullCAN Interrupt and Capture registers 0
900         __IO uint32_t FCANIC0;
901
902         ///Offset: 0x00000028 - FullCAN Interrupt and Capture registers 1
903         __IO uint32_t FCANIC1;
904 } LPC_CANAF_TypeDef;
905
906 typedef struct                          /* Central Registers                  */
907 {
908   __I  uint32_t TxSR;
909   __I  uint32_t RxSR;
910   __I  uint32_t MSR;
911 } LPC_CANCR_TypeDef;
912
913 typedef struct                          /* Controller Registers               */
914 {
915         ///Offset: 0x00000000 - Controls the operating mode of the CAN Controller
916         __IO uint32_t MOD;
917
918         ///Offset: 0x00000004 - Command bits that affect the state
919         __O  uint32_t CMR;
920
921         ///Offset: 0x00000008 - Global Controller Status and Error Counters
922         __IO uint32_t GSR;
923
924         ///Offset: 0x0000000C - Interrupt status, Arbitration Lost Capture, Error Code Capture
925         __I  uint32_t ICR;
926
927         ///Offset: 0x00000010 - Interrupt Enable Register
928         __IO uint32_t IER;
929
930         ///Offset: 0x00000014 - Bus Timing Register
931         __IO uint32_t BTR;
932
933         ///Offset: 0x00000018 - Error Warning Limit
934         __IO uint32_t EWL;
935
936         ///Offset: 0x0000001C - Status Register
937         __I  uint32_t SR;
938
939         ///Offset: 0x00000020 - Receive frame status
940         __IO uint32_t RFS;
941
942         ///Offset: 0x00000024 - Received Identifier
943         __IO uint32_t RID;
944
945         ///Offset: 0x00000028 - Received data bytes 1-4
946         __IO uint32_t RDA;
947
948         ///Offset: 0x0000002C - Received data bytes 5-8
949         __IO uint32_t RDB;
950
951         ///Offset: 0x00000030 - Transmit frame info (Tx Buffer 1)
952         __IO uint32_t TFI1;
953
954         ///Offset: 0x00000034 - Transmit Identifier (Tx Buffer 1)
955         __IO uint32_t TID1;
956
957         ///Offset: 0x00000038 - Transmit data bytes 1-4 (Tx Buffer 1)
958         __IO uint32_t TDA1;
959
960         ///Offset: 0x0000003C - Transmit data bytes 5-8 (Tx Buffer 1)
961         __IO uint32_t TDB1;
962
963         ///Offset: 0x00000040 - Transmit frame info (Tx Buffer 2)
964         __IO uint32_t TFI2;
965
966         ///Offset: 0x00000044 - Transmit Identifier (Tx Buffer 2)
967         __IO uint32_t TID2;
968
969         ///Offset: 0x00000048 - Transmit data bytes 1-4 (Tx Buffer 2)
970         __IO uint32_t TDA2;
971
972         ///Offset: 0x0000004C - Transmit data bytes 5-8 (Tx Buffer 2)
973         __IO uint32_t TDB2;
974
975         ///Offset: 0x00000050 - Transmit frame info (Tx Buffer 3)
976         __IO uint32_t TFI3;
977
978         ///Offset: 0x00000054 - Transmit Identifier (Tx Buffer 3)
979         __IO uint32_t TID3;
980
981         ///Offset: 0x00000058 - Transmit data bytes 1-4 (Tx Buffer 3)
982         __IO uint32_t TDA3;
983
984         ///Offset: 0x0000005C - Transmit data bytes 5-8 (Tx Buffer 3)
985         __IO uint32_t TDB3;
986 } LPC_CAN_TypeDef;
987
988 /*------------- General Purpose Direct Memory Access (GPDMA) -----------------*/
989 typedef struct                          /* Common Registers                   */
990 {
991   __I  uint32_t IntStat;
992   __I  uint32_t IntTCStat;
993   __O  uint32_t IntTCClear;
994   __I  uint32_t IntErrStat;
995   __O  uint32_t IntErrClr;
996   __I  uint32_t RawIntTCStat;
997   __I  uint32_t RawIntErrStat;
998   __I  uint32_t EnbldChns;
999   __IO uint32_t SoftBReq;
1000   __IO uint32_t SoftSReq;
1001   __IO uint32_t SoftLBReq;
1002   __IO uint32_t SoftLSReq;
1003   __IO uint32_t Config;
1004   __IO uint32_t Sync;
1005 } LPC_GPDMA_TypeDef;
1006
1007 typedef struct                          /* Channel Registers                  */
1008 {
1009   __IO uint32_t CSrcAddr;
1010   __IO uint32_t CDestAddr;
1011   __IO uint32_t CLLI;
1012   __IO uint32_t CControl;
1013   __IO uint32_t CConfig;
1014 } LPC_GPDMACH_TypeDef;
1015
1016 /*------------- Universal Serial Bus (USB) -----------------------------------*/
1017 typedef struct
1018 {
1019   __I  uint32_t Revision;             /* USB Host Registers                 */
1020   __IO uint32_t Control;
1021   __IO uint32_t CommandStatus;
1022   __IO uint32_t InterruptStatus;
1023   __IO uint32_t InterruptEnable;
1024   __IO uint32_t InterruptDisable;
1025   __IO uint32_t HCCA;
1026   __I  uint32_t PeriodCurrentED;
1027   __IO uint32_t ControlHeadED;
1028   __IO uint32_t ControlCurrentED;
1029   __IO uint32_t BulkHeadED;
1030   __IO uint32_t BulkCurrentED;
1031   __I  uint32_t DoneHead;
1032   __IO uint32_t FmInterval;
1033   __I  uint32_t FmRemaining;
1034   __I  uint32_t FmNumber;
1035   __IO uint32_t PeriodicStart;
1036   __IO uint32_t LSTreshold;
1037   __IO uint32_t RhDescriptorA;
1038   __IO uint32_t RhDescriptorB;
1039   __IO uint32_t RhStatus;
1040   __IO uint32_t RhPortStatus1;
1041   __IO uint32_t RhPortStatus2;
1042        uint32_t RESERVED0[40];
1043   __I  uint32_t Module_ID;
1044
1045   __I  uint32_t IntSt;               /* USB On-The-Go Registers            */
1046   __IO uint32_t IntEn;
1047   __O  uint32_t IntSet;
1048   __O  uint32_t IntClr;
1049   __IO uint32_t StCtrl;
1050   __IO uint32_t Tmr;
1051        uint32_t RESERVED1[58];
1052
1053   __I  uint32_t DevIntSt;            /* USB Device Interrupt Registers     */
1054   __IO uint32_t DevIntEn;
1055   __O  uint32_t DevIntClr;
1056   __O  uint32_t DevIntSet;
1057
1058   __O  uint32_t CmdCode;             /* USB Device SIE Command Registers   */
1059   __I  uint32_t CmdData;
1060
1061   __I  uint32_t RxData;              /* USB Device Transfer Registers      */
1062   __O  uint32_t TxData;
1063   __I  uint32_t RxPLen;
1064   __O  uint32_t TxPLen;
1065   __IO uint32_t Ctrl;
1066   __O  uint32_t DevIntPri;
1067
1068   __I  uint32_t EpIntSt;             /* USB Device Endpoint Interrupt Regs */
1069   __IO uint32_t EpIntEn;
1070   __O  uint32_t EpIntClr;
1071   __O  uint32_t EpIntSet;
1072   __O  uint32_t EpIntPri;
1073
1074   __IO uint32_t ReEp;                /* USB Device Endpoint Realization Reg*/
1075   __O  uint32_t EpInd;
1076   __IO uint32_t MaxPSize;
1077
1078   __I  uint32_t DMARSt;              /* USB Device DMA Registers           */
1079   __O  uint32_t DMARClr;
1080   __O  uint32_t DMARSet;
1081        uint32_t RESERVED2[9];
1082   __IO uint32_t UDCAH;
1083   __I  uint32_t EpDMASt;
1084   __O  uint32_t EpDMAEn;
1085   __O  uint32_t EpDMADis;
1086   __I  uint32_t DMAIntSt;
1087   __IO uint32_t DMAIntEn;
1088        uint32_t RESERVED3[2];
1089   __I  uint32_t EoTIntSt;
1090   __O  uint32_t EoTIntClr;
1091   __O  uint32_t EoTIntSet;
1092   __I  uint32_t NDDRIntSt;
1093   __O  uint32_t NDDRIntClr;
1094   __O  uint32_t NDDRIntSet;
1095   __I  uint32_t SysErrIntSt;
1096   __O  uint32_t SysErrIntClr;
1097   __O  uint32_t SysErrIntSet;
1098        uint32_t RESERVED4[15];
1099
1100   union {
1101   __I  uint32_t I2C_RX;                 /* USB OTG I2C Registers              */
1102   __O  uint32_t I2C_TX;
1103   };
1104   __IO  uint32_t I2C_STS;
1105   __IO uint32_t I2C_CTL;
1106   __IO uint32_t I2C_CLKHI;
1107   __O  uint32_t I2C_CLKLO;
1108        uint32_t RESERVED5[824];
1109
1110   union {
1111   __IO uint32_t USBClkCtrl;             /* USB Clock Control Registers        */
1112   __IO uint32_t OTGClkCtrl;
1113   };
1114   union {
1115   __I  uint32_t USBClkSt;
1116   __I  uint32_t OTGClkSt;
1117   };
1118 } LPC_USB_TypeDef;
1119
1120 /*------------- Ethernet Media Access Controller (EMAC) ----------------------*/
1121 typedef struct
1122 {
1123   __IO uint32_t MAC1;                   /* MAC Registers                      */
1124   __IO uint32_t MAC2;
1125   __IO uint32_t IPGT;
1126   __IO uint32_t IPGR;
1127   __IO uint32_t CLRT;
1128   __IO uint32_t MAXF;
1129   __IO uint32_t SUPP;
1130   __IO uint32_t TEST;
1131   __IO uint32_t MCFG;
1132   __IO uint32_t MCMD;
1133   __IO uint32_t MADR;
1134   __O  uint32_t MWTD;
1135   __I  uint32_t MRDD;
1136   __I  uint32_t MIND;
1137        uint32_t RESERVED0[2];
1138   __IO uint32_t SA0;
1139   __IO uint32_t SA1;
1140   __IO uint32_t SA2;
1141        uint32_t RESERVED1[45];
1142   __IO uint32_t Command;                /* Control Registers                  */
1143   __I  uint32_t Status;
1144   __IO uint32_t RxDescriptor;
1145   __IO uint32_t RxStatus;
1146   __IO uint32_t RxDescriptorNumber;
1147   __I  uint32_t RxProduceIndex;
1148   __IO uint32_t RxConsumeIndex;
1149   __IO uint32_t TxDescriptor;
1150   __IO uint32_t TxStatus;
1151   __IO uint32_t TxDescriptorNumber;
1152   __IO uint32_t TxProduceIndex;
1153   __I  uint32_t TxConsumeIndex;
1154        uint32_t RESERVED2[10];
1155   __I  uint32_t TSV0;
1156   __I  uint32_t TSV1;
1157   __I  uint32_t RSV;
1158        uint32_t RESERVED3[3];
1159   __IO uint32_t FlowControlCounter;
1160   __I  uint32_t FlowControlStatus;
1161        uint32_t RESERVED4[34];
1162   __IO uint32_t RxFilterCtrl;           /* Rx Filter Registers                */
1163   __I  uint32_t RxFilterWoLStatus;
1164   __O  uint32_t RxFilterWoLClear;
1165        uint32_t RESERVED5;
1166   __IO uint32_t HashFilterL;
1167   __IO uint32_t HashFilterH;
1168        uint32_t RESERVED6[882];
1169   __I  uint32_t IntStatus;              /* Module Control Registers           */
1170   __IO uint32_t IntEnable;
1171   __O  uint32_t IntClear;
1172   __O  uint32_t IntSet;
1173        uint32_t RESERVED7;
1174   __IO uint32_t PowerDown;
1175        uint32_t RESERVED8;
1176   __IO uint32_t Module_ID;
1177 } LPC_EMAC_TypeDef;
1178
1179 /*------------- LCD controller (LCD) -----------------------------------------*/
1180 typedef struct
1181 {
1182   __IO uint32_t TIMH;                   /* LCD Registers                      */
1183   __IO uint32_t TIMV;
1184   __IO uint32_t POL;
1185   __IO uint32_t LE;
1186   __IO uint32_t UPBASE;
1187   __IO uint32_t LPBASE;
1188   __IO uint32_t CTRL;
1189   __IO uint32_t INTMSK;
1190   __I  uint32_t INTRAW;
1191   __I  uint32_t INTSTAT;
1192   __O  uint32_t INTCLR;
1193   __I  uint32_t UPCURR;
1194   __I  uint32_t LPCURR;
1195        uint32_t RESERVED0[115];
1196   __IO uint32_t PAL[128];
1197        uint32_t RESERVED1[256];
1198   __IO uint32_t CRSR_IMG[256];
1199   __IO uint32_t CRSR_CTRL;
1200   __IO uint32_t CRSR_CFG;
1201   __IO uint32_t CRSR_PAL0;
1202   __IO uint32_t CRSR_PAL1;
1203   __IO uint32_t CRSR_XY;
1204   __IO uint32_t CRSR_CLIP;
1205        uint32_t RESERVED2[2];
1206   __IO uint32_t CRSR_INTMSK;
1207   __O  uint32_t CRSR_INTCLR;
1208   __I  uint32_t CRSR_INTRAW;
1209   __I  uint32_t CRSR_INTSTAT;
1210 } LPC_LCD_TypeDef;
1211
1212 /*------------- External Memory Controller (EMC) -----------------------------*/
1213 typedef struct
1214 {
1215   __IO uint32_t Control;
1216   __I  uint32_t Status;
1217   __IO uint32_t Config;
1218        uint32_t RESERVED0[5];
1219   __IO uint32_t DynamicControl;
1220   __IO uint32_t DynamicRefresh;
1221   __IO uint32_t DynamicReadConfig;
1222        uint32_t RESERVED1[1];
1223   __IO uint32_t DynamicRP;
1224   __IO uint32_t DynamicRAS;
1225   __IO uint32_t DynamicSREX;
1226   __IO uint32_t DynamicAPR;
1227   __IO uint32_t DynamicDAL;
1228   __IO uint32_t DynamicWR;
1229   __IO uint32_t DynamicRC;
1230   __IO uint32_t DynamicRFC;
1231   __IO uint32_t DynamicXSR;
1232   __IO uint32_t DynamicRRD;
1233   __IO uint32_t DynamicMRD;
1234        uint32_t RESERVED2[9];
1235   __IO uint32_t StaticExtendedWait;
1236        uint32_t RESERVED3[31];
1237   __IO uint32_t DynamicConfig0;
1238   __IO uint32_t DynamicRasCas0;
1239        uint32_t RESERVED4[6];
1240   __IO uint32_t DynamicConfig1;
1241   __IO uint32_t DynamicRasCas1;
1242        uint32_t RESERVED5[6];
1243   __IO uint32_t DynamicConfig2;
1244   __IO uint32_t DynamicRasCas2;
1245        uint32_t RESERVED6[6];
1246   __IO uint32_t DynamicConfig3;
1247   __IO uint32_t DynamicRasCas3;
1248        uint32_t RESERVED7[38];
1249   __IO uint32_t StaticConfig0;
1250   __IO uint32_t StaticWaitWen0;
1251   __IO uint32_t StaticWaitOen0;
1252   __IO uint32_t StaticWaitRd0;
1253   __IO uint32_t StaticWaitPage0;
1254   __IO uint32_t StaticWaitWr0;
1255   __IO uint32_t StaticWaitTurn0;
1256        uint32_t RESERVED8[1];
1257   __IO uint32_t StaticConfig1;
1258   __IO uint32_t StaticWaitWen1;
1259   __IO uint32_t StaticWaitOen1;
1260   __IO uint32_t StaticWaitRd1;
1261   __IO uint32_t StaticWaitPage1;
1262   __IO uint32_t StaticWaitWr1;
1263   __IO uint32_t StaticWaitTurn1;
1264        uint32_t RESERVED9[1];
1265   __IO uint32_t StaticConfig2;
1266   __IO uint32_t StaticWaitWen2;
1267   __IO uint32_t StaticWaitOen2;
1268   __IO uint32_t StaticWaitRd2;
1269   __IO uint32_t StaticWaitPage2;
1270   __IO uint32_t StaticWaitWr2;
1271   __IO uint32_t StaticWaitTurn2;
1272        uint32_t RESERVED10[1];
1273   __IO uint32_t StaticConfig3;
1274   __IO uint32_t StaticWaitWen3;
1275   __IO uint32_t StaticWaitOen3;
1276   __IO uint32_t StaticWaitRd3;
1277   __IO uint32_t StaticWaitPage3;
1278   __IO uint32_t StaticWaitWr3;
1279   __IO uint32_t StaticWaitTurn3;
1280 } LPC_EMC_TypeDef;
1281
1282 /*------------- CRC Engine (CRC) -----------------------------------------*/
1283 typedef struct
1284 {
1285   __IO uint32_t MODE;
1286   __IO uint32_t SEED;
1287   union {
1288   __I  uint32_t SUM;
1289   __O  uint32_t WR_DATA_DWORD;
1290   __O  uint16_t WR_DATA_WORD;
1291        uint16_t RESERVED_WORD;
1292   __O  uint8_t WR_DATA_BYTE;
1293        uint8_t RESERVED_BYTE[3];
1294   };
1295 } LPC_CRC_TypeDef;
1296
1297 /*------------- EEPROM Controller (EEPROM) -----------------------------------*/
1298 typedef struct
1299 {
1300   __IO uint32_t CMD;                    /* 0x0080 */
1301   __IO uint32_t ADDR;
1302   __IO uint32_t WDATA;
1303   __IO uint32_t RDATA;
1304   __IO uint32_t WSTATE;                 /* 0x0090 */
1305   __IO uint32_t CLKDIV;
1306   __IO uint32_t PWRDWN;                 /* 0x0098 */
1307        uint32_t RESERVED0[975];
1308   __IO uint32_t INT_CLR_ENABLE; /* 0x0FD8 */
1309   __IO uint32_t INT_SET_ENABLE;
1310   __IO uint32_t INT_STATUS;             /* 0x0FE0 */
1311   __IO uint32_t INT_ENABLE;
1312   __IO uint32_t INT_CLR_STATUS;
1313   __IO uint32_t INT_SET_STATUS;
1314 } LPC_EEPROM_TypeDef;
1315
1316 #if defined ( __CC_ARM   )
1317 #pragma no_anon_unions
1318 #endif
1319
1320 /******************************************************************************/
1321 /*                         Peripheral memory map                              */
1322 /******************************************************************************/
1323 /* Base addresses                                                             */
1324 #define LPC_FLASH_BASE        (0x00000000UL)
1325 #define LPC_RAM_BASE          (0x10000000UL)
1326 #define LPC_PERI_RAM_BASE     (0x20000000UL)
1327 #define LPC_APB0_BASE         (0x40000000UL)
1328 #define LPC_APB1_BASE         (0x40080000UL)
1329 #define LPC_AHBRAM1_BASE      (0x20004000UL)
1330 #define LPC_AHB_BASE          (0x20080000UL)
1331 #define LPC_CM3_BASE          (0xE0000000UL)
1332
1333 /* APB0 peripherals                                                           */
1334 #define LPC_WDT_BASE          (LPC_APB0_BASE + 0x00000)
1335 #define LPC_TIM0_BASE         (LPC_APB0_BASE + 0x04000)
1336 #define LPC_TIM1_BASE         (LPC_APB0_BASE + 0x08000)
1337 #define LPC_UART0_BASE        (LPC_APB0_BASE + 0x0C000)
1338 #define LPC_UART1_BASE        (LPC_APB0_BASE + 0x10000)
1339 #define LPC_PWM0_BASE         (LPC_APB0_BASE + 0x14000)
1340 #define LPC_PWM1_BASE         (LPC_APB0_BASE + 0x18000)
1341 #define LPC_I2C0_BASE         (LPC_APB0_BASE + 0x1C000)
1342 #define LPC_RTC_BASE          (LPC_APB0_BASE + 0x24000)
1343 #define LPC_GPIOINT_BASE      (LPC_APB0_BASE + 0x28080)
1344 #define LPC_IOCON_BASE        (LPC_APB0_BASE + 0x2C000)
1345 #define LPC_SSP1_BASE         (LPC_APB0_BASE + 0x30000)
1346 #define LPC_ADC_BASE          (LPC_APB0_BASE + 0x34000)
1347 #define LPC_CANAF_RAM_BASE    (LPC_APB0_BASE + 0x38000)
1348 #define LPC_CANAF_BASE        (LPC_APB0_BASE + 0x3C000)
1349 #define LPC_CANCR_BASE        (LPC_APB0_BASE + 0x40000)
1350 #define LPC_CAN1_BASE         (LPC_APB0_BASE + 0x44000)
1351 #define LPC_CAN2_BASE         (LPC_APB0_BASE + 0x48000)
1352 #define LPC_I2C1_BASE         (LPC_APB0_BASE + 0x5C000)
1353
1354 /* APB1 peripherals                                                           */
1355 #define LPC_SSP0_BASE         (LPC_APB1_BASE + 0x08000)
1356 #define LPC_DAC_BASE          (LPC_APB1_BASE + 0x0C000)
1357 #define LPC_TIM2_BASE         (LPC_APB1_BASE + 0x10000)
1358 #define LPC_TIM3_BASE         (LPC_APB1_BASE + 0x14000)
1359 #define LPC_UART2_BASE        (LPC_APB1_BASE + 0x18000)
1360 #define LPC_UART3_BASE        (LPC_APB1_BASE + 0x1C000)
1361 #define LPC_I2C2_BASE         (LPC_APB1_BASE + 0x20000)
1362 #define LPC_UART4_BASE        (LPC_APB1_BASE + 0x24000)
1363 #define LPC_I2S_BASE          (LPC_APB1_BASE + 0x28000)
1364 #define LPC_SSP2_BASE         (LPC_APB1_BASE + 0x2C000)
1365 #define LPC_MCPWM_BASE        (LPC_APB1_BASE + 0x38000)
1366 #define LPC_QEI_BASE          (LPC_APB1_BASE + 0x3C000)
1367 #define LPC_MCI_BASE          (LPC_APB1_BASE + 0x40000)
1368 #define LPC_SC_BASE           (LPC_APB1_BASE + 0x7C000)
1369
1370 /* AHB peripherals                                                            */
1371 #define LPC_GPDMA_BASE        (LPC_AHB_BASE  + 0x00000)
1372 #define LPC_GPDMACH0_BASE     (LPC_AHB_BASE  + 0x00100)
1373 #define LPC_GPDMACH1_BASE     (LPC_AHB_BASE  + 0x00120)
1374 #define LPC_GPDMACH2_BASE     (LPC_AHB_BASE  + 0x00140)
1375 #define LPC_GPDMACH3_BASE     (LPC_AHB_BASE  + 0x00160)
1376 #define LPC_GPDMACH4_BASE     (LPC_AHB_BASE  + 0x00180)
1377 #define LPC_GPDMACH5_BASE     (LPC_AHB_BASE  + 0x001A0)
1378 #define LPC_GPDMACH6_BASE     (LPC_AHB_BASE  + 0x001C0)
1379 #define LPC_GPDMACH7_BASE     (LPC_AHB_BASE  + 0x001E0)
1380 #define LPC_EMAC_BASE         (LPC_AHB_BASE  + 0x04000)
1381 #define LPC_LCD_BASE          (LPC_AHB_BASE  + 0x08000)
1382 #define LPC_USB_BASE          (LPC_AHB_BASE  + 0x0C000)
1383 #define LPC_CRC_BASE          (LPC_AHB_BASE  + 0x10000)
1384 #define LPC_GPIO0_BASE        (LPC_AHB_BASE  + 0x18000)
1385 #define LPC_GPIO1_BASE        (LPC_AHB_BASE  + 0x18020)
1386 #define LPC_GPIO2_BASE        (LPC_AHB_BASE  + 0x18040)
1387 #define LPC_GPIO3_BASE        (LPC_AHB_BASE  + 0x18060)
1388 #define LPC_GPIO4_BASE        (LPC_AHB_BASE  + 0x18080)
1389 #define LPC_GPIO5_BASE        (LPC_AHB_BASE  + 0x180A0)
1390 #define LPC_EMC_BASE          (LPC_AHB_BASE  + 0x1C000)
1391
1392 #define LPC_EEPROM_BASE       (LPC_FLASH_BASE+ 0x200080)
1393
1394
1395 /******************************************************************************/
1396 /*                         Peripheral declaration                             */
1397 /******************************************************************************/
1398 #define LPC_SC                ((LPC_SC_TypeDef        *) LPC_SC_BASE       )
1399 #define LPC_WDT               ((LPC_WDT_TypeDef       *) LPC_WDT_BASE      )
1400 #define LPC_TIM0              ((LPC_TIM_TypeDef       *) LPC_TIM0_BASE     )
1401 #define LPC_TIM1              ((LPC_TIM_TypeDef       *) LPC_TIM1_BASE     )
1402 #define LPC_TIM2              ((LPC_TIM_TypeDef       *) LPC_TIM2_BASE     )
1403 #define LPC_TIM3              ((LPC_TIM_TypeDef       *) LPC_TIM3_BASE     )
1404 #define LPC_UART0             ((LPC_UART_TypeDef      *) LPC_UART0_BASE    )
1405 #define LPC_UART1             ((LPC_UART1_TypeDef     *) LPC_UART1_BASE    )
1406 #define LPC_UART2             ((LPC_UART_TypeDef      *) LPC_UART2_BASE    )
1407 #define LPC_UART3             ((LPC_UART_TypeDef      *) LPC_UART3_BASE    )
1408 #define LPC_UART4             ((LPC_UART4_TypeDef     *) LPC_UART4_BASE    )
1409 #define LPC_PWM0              ((LPC_PWM_TypeDef       *) LPC_PWM0_BASE     )
1410 #define LPC_PWM1              ((LPC_PWM_TypeDef       *) LPC_PWM1_BASE     )
1411 #define LPC_I2C0              ((LPC_I2C_TypeDef       *) LPC_I2C0_BASE     )
1412 #define LPC_I2C1              ((LPC_I2C_TypeDef       *) LPC_I2C1_BASE     )
1413 #define LPC_I2C2              ((LPC_I2C_TypeDef       *) LPC_I2C2_BASE     )
1414 #define LPC_I2S               ((LPC_I2S_TypeDef       *) LPC_I2S_BASE      )
1415 #define LPC_RTC               ((LPC_RTC_TypeDef       *) LPC_RTC_BASE      )
1416 #define LPC_GPIOINT           ((LPC_GPIOINT_TypeDef   *) LPC_GPIOINT_BASE  )
1417 #define LPC_IOCON             ((LPC_IOCON_TypeDef     *) LPC_IOCON_BASE    )
1418 #define LPC_SSP0              ((LPC_SSP_TypeDef       *) LPC_SSP0_BASE     )
1419 #define LPC_SSP1              ((LPC_SSP_TypeDef       *) LPC_SSP1_BASE     )
1420 #define LPC_SSP2              ((LPC_SSP_TypeDef       *) LPC_SSP2_BASE     )
1421 #define LPC_ADC               ((LPC_ADC_TypeDef       *) LPC_ADC_BASE      )
1422 #define LPC_DAC               ((LPC_DAC_TypeDef       *) LPC_DAC_BASE      )
1423 #define LPC_CANAF_RAM         ((LPC_CANAF_RAM_TypeDef *) LPC_CANAF_RAM_BASE)
1424 #define LPC_CANAF             ((LPC_CANAF_TypeDef     *) LPC_CANAF_BASE    )
1425 #define LPC_CANCR             ((LPC_CANCR_TypeDef     *) LPC_CANCR_BASE    )
1426 #define LPC_CAN1              ((LPC_CAN_TypeDef       *) LPC_CAN1_BASE     )
1427 #define LPC_CAN2              ((LPC_CAN_TypeDef       *) LPC_CAN2_BASE     )
1428 #define LPC_MCPWM             ((LPC_MCPWM_TypeDef     *) LPC_MCPWM_BASE    )
1429 #define LPC_QEI               ((LPC_QEI_TypeDef       *) LPC_QEI_BASE      )
1430 #define LPC_MCI               ((LPC_MCI_TypeDef       *) LPC_MCI_BASE      )
1431 #define LPC_GPDMA             ((LPC_GPDMA_TypeDef     *) LPC_GPDMA_BASE    )
1432 #define LPC_GPDMACH0          ((LPC_GPDMACH_TypeDef   *) LPC_GPDMACH0_BASE )
1433 #define LPC_GPDMACH1          ((LPC_GPDMACH_TypeDef   *) LPC_GPDMACH1_BASE )
1434 #define LPC_GPDMACH2          ((LPC_GPDMACH_TypeDef   *) LPC_GPDMACH2_BASE )
1435 #define LPC_GPDMACH3          ((LPC_GPDMACH_TypeDef   *) LPC_GPDMACH3_BASE )
1436 #define LPC_GPDMACH4          ((LPC_GPDMACH_TypeDef   *) LPC_GPDMACH4_BASE )
1437 #define LPC_GPDMACH5          ((LPC_GPDMACH_TypeDef   *) LPC_GPDMACH5_BASE )
1438 #define LPC_GPDMACH6          ((LPC_GPDMACH_TypeDef   *) LPC_GPDMACH6_BASE )
1439 #define LPC_GPDMACH7          ((LPC_GPDMACH_TypeDef   *) LPC_GPDMACH7_BASE )
1440 #define LPC_EMAC              ((LPC_EMAC_TypeDef      *) LPC_EMAC_BASE     )
1441 #define LPC_LCD               ((LPC_LCD_TypeDef       *) LPC_LCD_BASE      )
1442 #define LPC_USB               ((LPC_USB_TypeDef       *) LPC_USB_BASE      )
1443 #define LPC_GPIO0             ((LPC_GPIO_TypeDef      *) LPC_GPIO0_BASE    )
1444 #define LPC_GPIO1             ((LPC_GPIO_TypeDef      *) LPC_GPIO1_BASE    )
1445 #define LPC_GPIO2             ((LPC_GPIO_TypeDef      *) LPC_GPIO2_BASE    )
1446 #define LPC_GPIO3             ((LPC_GPIO_TypeDef      *) LPC_GPIO3_BASE    )
1447 #define LPC_GPIO4             ((LPC_GPIO_TypeDef      *) LPC_GPIO4_BASE    )
1448 #define LPC_GPIO5             ((LPC_GPIO_TypeDef      *) LPC_GPIO5_BASE    )
1449 #define LPC_EMC               ((LPC_EMC_TypeDef       *) LPC_EMC_BASE      )
1450 #define LPC_CRC               ((LPC_CRC_TypeDef       *) LPC_CRC_BASE      )
1451 #define LPC_EEPROM            ((LPC_EEPROM_TypeDef    *) LPC_EEPROM_BASE   )
1452
1453 #endif  // __LPC177x_8x_H__