CMSIS2000  0.0.7
 Указатель Структуры данных Файлы Функции Переменные Определения типов Перечисления Элементы перечислений Макросы Группы Страницы
LPC17xx.h
См. документацию.
1 /**************************************************************************//**
2  * @file LPC17xx/Include/LPC17xx.h
3  * @brief CMSIS Cortex-M3 Core Peripheral Access Layer Header File for
4  * NXP LPC17xx Device Series
5  * @version: V1.09
6  * @date: 25. July. 2011
7  *
8  * @note
9  * Copyright (C) 2009 ARM Limited. All rights reserved.
10  *
11  * @par
12  * ARM Limited (ARM) is supplying this software for use with Cortex-M
13  * processor based microcontrollers. This file can be freely distributed
14  * within development tools that are supporting such ARM based processors.
15  *
16  * @par
17  * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
18  * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
19  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
20  * ARM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
21  * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
22  *
23  ******************************************************************************/
24 
25 
26 #ifndef __LPC17xx_H__
27 #define __LPC17xx_H__
28 
29 /* default MCU_MODEL ----------------------------------------------------------- */
30 #ifndef i_MCU_MODEL
31  #define i_MCU_MODEL 1761
32  #ifndef i_ARCH
33  #define i_ARCH CM3
34  #endif
35 #endif
36 /*
37  * ==========================================================================
38  * ---------- Interrupt Number Definition -----------------------------------
39  * ==========================================================================
40  */
41 
42 /** @addtogroup LPC17xx_System
43  * @{
44  */
45 
46 /** @brief IRQ interrupt source definition */
47 typedef enum IRQn
48 {
49 /****** Cortex-M3 Processor Exceptions Numbers ***************************************************/
50  NonMaskableInt_IRQn = -14, /*!< 2 Non Maskable Interrupt */
51  MemoryManagement_IRQn = -12, /*!< 4 Cortex-M3 Memory Management Interrupt */
52  BusFault_IRQn = -11, /*!< 5 Cortex-M3 Bus Fault Interrupt */
53  UsageFault_IRQn = -10, /*!< 6 Cortex-M3 Usage Fault Interrupt */
54  SVCall_IRQn = -5, /*!< 11 Cortex-M3 SV Call Interrupt */
55  DebugMonitor_IRQn = -4, /*!< 12 Cortex-M3 Debug Monitor Interrupt */
56  PendSV_IRQn = -2, /*!< 14 Cortex-M3 Pend SV Interrupt */
57  SysTick_IRQn = -1, /*!< 15 Cortex-M3 System Tick Interrupt */
58 
59 /****** LPC17xx Specific Interrupt Numbers *******************************************************/
60  WDT_IRQn = 0, /*!< Watchdog Timer Interrupt */
61  TIMER0_IRQn = 1, /*!< Timer0 Interrupt */
62  TIMER1_IRQn = 2, /*!< Timer1 Interrupt */
63  TIMER2_IRQn = 3, /*!< Timer2 Interrupt */
64  TIMER3_IRQn = 4, /*!< Timer3 Interrupt */
65  UART0_IRQn = 5, /*!< UART0 Interrupt */
66  UART1_IRQn = 6, /*!< UART1 Interrupt */
67  UART2_IRQn = 7, /*!< UART2 Interrupt */
68  UART3_IRQn = 8, /*!< UART3 Interrupt */
69  PWM1_IRQn = 9, /*!< PWM1 Interrupt */
70  I2C0_IRQn = 10, /*!< I2C0 Interrupt */
71  I2C1_IRQn = 11, /*!< I2C1 Interrupt */
72  I2C2_IRQn = 12, /*!< I2C2 Interrupt */
73  SPI_IRQn = 13, /*!< SPI Interrupt */
74  SSP0_IRQn = 14, /*!< SSP0 Interrupt */
75  SSP1_IRQn = 15, /*!< SSP1 Interrupt */
76  PLL0_IRQn = 16, /*!< PLL0 Lock (Main PLL) Interrupt */
77  RTC_IRQn = 17, /*!< Real Time Clock Interrupt */
78  EINT0_IRQn = 18, /*!< External Interrupt 0 Interrupt */
79  EINT1_IRQn = 19, /*!< External Interrupt 1 Interrupt */
80  EINT2_IRQn = 20, /*!< External Interrupt 2 Interrupt */
81  EINT3_IRQn = 21, /*!< External Interrupt 3 Interrupt */
82  ADC_IRQn = 22, /*!< A/D Converter Interrupt */
83  BOD_IRQn = 23, /*!< Brown-Out Detect Interrupt */
84  USB_IRQn = 24, /*!< USB Interrupt */
85  CAN_IRQn = 25, /*!< CAN Interrupt */
86  DMA_IRQn = 26, /*!< General Purpose DMA Interrupt */
87  I2S_IRQn = 27, /*!< I2S Interrupt */
88  ENET_IRQn = 28, /*!< Ethernet Interrupt */
89  RIT_IRQn = 29, /*!< Repetitive Interrupt Timer Interrupt */
90  MCPWM_IRQn = 30, /*!< Motor Control PWM Interrupt */
91  QEI_IRQn = 31, /*!< Quadrature Encoder Interface Interrupt */
92  PLL1_IRQn = 32, /*!< PLL1 Lock (USB PLL) Interrupt */
93  USBActivity_IRQn = 33, /*!< USB Activity Interrupt */
94  CANActivity_IRQn = 34 /*!< CAN Activity Interrupt */
95 } IRQn_Type;
96 
97 
98 /*
99  * ==========================================================================
100  * ----------- Processor and Core Peripheral Section ------------------------
101  * ==========================================================================
102  */
103 
104 /* Configuration of the Cortex-M3 Processor and Core Peripherals */
105 #define __MPU_PRESENT 1 /*!< MPU present or not */
106 #define __NVIC_PRIO_BITS 5 /*!< Number of Bits used for Priority Levels */
107 #define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */
108 
109 
110 #include "core_cm3.h" /* Cortex-M3 processor and core peripherals */
111 #include "system_LPC17xx.h" /* System Header */
112 
113 
114 /******************************************************************************/
115 /* Device Specific Peripheral registers structures */
116 /******************************************************************************/
117 
118 #if defined ( __CC_ARM )
119 #pragma anon_unions
120 #endif
121 
122 /*------------- System Control (SC) ------------------------------------------*/
123 /** @brief System Control (SC) register structure definition */
124 typedef struct
125 {
126  __IO uint32_t FLASHCFG; /* Flash Accelerator Module */
127  uint32_t RESERVED0[31];
128  __IO uint32_t PLL0CON; /* Clocking and Power Control */
132  uint32_t RESERVED1[4];
137  uint32_t RESERVED2[4];
140  uint32_t RESERVED3[15];
146  uint32_t RESERVED4[10];
147  __IO uint32_t EXTINT; /* External Interrupts */
151  uint32_t RESERVED6[12];
152  __IO uint32_t RSID; /* Reset */
153  uint32_t RESERVED7[7];
154  __IO uint32_t SCS; /* Syscon Miscellaneous Registers */
155  __IO uint32_t IRCTRIM; /* Clock Dividers */
158  uint32_t RESERVED8[4];
159  __IO uint32_t USBIntSt; /* USB Device/OTG Interrupt Register */
161  __IO uint32_t CLKOUTCFG; /* Clock Output Configuration */
162  } LPC_SC_TypeDef;
163 
164 /*------------- Pin Connect Block (PINCON) -----------------------------------*/
165 /** @brief Pin Connect Block (PINCON) register structure definition */
166 typedef struct
167 {
179  uint32_t RESERVED0[5];
197 
198 /*------------- General Purpose Input/Output (GPIO) --------------------------*/
199 /** @brief General Purpose Input/Output (GPIO) register structure definition */
200 typedef struct
201 {
202  union {
204  struct {
207  };
208  struct {
213  };
214  };
215  uint32_t RESERVED0[3];
216  union {
218  struct {
221  };
222  struct {
227  };
228  };
229  union {
231  struct {
234  };
235  struct {
240  };
241  };
242  union {
244  struct {
247  };
248  struct {
253  };
254  };
255  union {
257  struct {
260  };
261  struct {
266  };
267  };
269 
270 /** @brief General Purpose Input/Output interrupt (GPIOINT) register structure definition */
271 typedef struct
272 {
279  uint32_t RESERVED0[3];
286 
287 /*------------- Timer (TIM) --------------------------------------------------*/
288 // Timer Interrupt Register Bit Definitions
289 #define TIR_MR0I_Msk (1 << 0) // Interrupt flag for match channel 0
290 #define TIR_MR1I_Msk (1 << 1) // Interrupt flag for match channel 1
291 #define TIR_MR2I_Msk (1 << 2) // Interrupt flag for match channel 2
292 #define TIR_MR3I_Msk (1 << 3) // Interrupt flag for match channel 3
293 #define TIR_CR0I_Msk (1 << 4) // Interrupt flag for capture channel 0 event
294 #define TIR_CR1I_Msk (1 << 5) // Interrupt flag for capture channel 1 event
295 #define TIR_CR2I_Msk (1 << 6) // Interrupt flag for capture channel 2 event
296 #define TIR_CR3I_Msk (1 << 7) // Interrupt flag for capture channel 3 event
297 
298 // PWM Interrupt Register Bit Definitions
299 #define PWMIR_MR0I_Msk (1 << 0) // Interrupt flag for match channel 0
300 #define PWMIR_MR1I_Msk (1 << 1) // Interrupt flag for match channel 1
301 #define PWMIR_MR2I_Msk (1 << 2) // Interrupt flag for match channel 2
302 #define PWMIR_MR3I_Msk (1 << 3) // Interrupt flag for match channel 3
303 #define PWMIR_MR4I_Msk (1 << 8) // Interrupt flag for match channel 4
304 #define PWMIR_MR5I_Msk (1 << 9) // Interrupt flag for match channel 5
305 #define PWMIR_MR6I_Msk (1 << 10) // Interrupt flag for match channel 6
306 #define PWMIR_Msk (0x070F)
307 
308 // Timer Control Register Bit Definitions
309 #define TCR_ENABLE_Msk (1 << 0)
310 #define TCR_RESET_Msk (1 << 1)
311 
312 // Timer Match Control Register Bit Definitions
313 #define TMCR_MR0_I_Msk (1 << 0) // Enable Interrupt when MR0 matches TC
314 #define TMCR_MR0_R_Msk (1 << 1) // Enable Reset of TC upon MR0 match
315 #define TMCR_MR0_S_Msk (1 << 2) // Enable Stop of TC upon MR0 match
316 #define TMCR_MR1_I_Msk (1 << 3) // Enable Interrupt when MR1 matches TC
317 #define TMCR_MR1_R_Msk (1 << 4) // Enable Reset of TC upon MR1 match
318 #define TMCR_MR1_S_Msk (1 << 5) // Enable Stop of TC upon MR1 match
319 #define TMCR_MR2_I_Msk (1 << 6) // Enable Interrupt when MR2 matches TC
320 #define TMCR_MR2_R_Msk (1 << 7) // Enable Reset of TC upon MR2 match
321 #define TMCR_MR2_S_Msk (1 << 8) // Enable Stop of TC upon MR2 match
322 #define TMCR_MR3_I_Msk (1 << 9) // Enable Interrupt when MR3 matches TC
323 #define TMCR_MR3_R_Msk (1 << 10) // Enable Reset of TC upon MR3 match
324 #define TMCR_MR3_S_Msk (1 << 11) // Enable Stop of TC upon MR3 match
325 
326 // Timer Capture Control Register Bit Definitions
327 #define TCCR_CR0_R_Msk (1 << 0) // Enable Rising edge on CAPn.0 will load TC to CR0
328 #define TCCR_CR0_F_Msk (1 << 1) // Enable Falling edge on CAPn.0 will load TC to CR0
329 #define TCCR_CR0_I_Msk (1 << 2) // Enable Interrupt on load of CR0
330 #define TCCR_CR1_R_Msk (1 << 3) // Enable Rising edge on CAPn.1 will load TC to CR1
331 #define TCCR_CR1_F_Msk (1 << 4) // Enable Falling edge on CAPn.1 will load TC to CR1
332 #define TCCR_CR1_I_Msk (1 << 5) // Enable Interrupt on load of CR1
333 #define TCCR_CR2_R_Msk (1 << 6) // Enable Rising edge on CAPn.2 will load TC to CR2
334 #define TCCR_CR2_F_Msk (1 << 7) // Enable Falling edge on CAPn.2 will load TC to CR2
335 #define TCCR_CR2_I_Msk (1 << 8) // Enable Interrupt on load of CR2
336 #define TCCR_CR3_R_Msk (1 << 9) // Enable Rising edge on CAPn.3 will load TC to CR3
337 #define TCCR_CR3_F_Msk (1 << 10) // Enable Falling edge on CAPn.3 will load TC to CR3
338 #define TCCR_CR3_I_Msk (1 << 11) // Enable Interrupt on load of CR3
339 
340 /** @brief Timer (TIM) register structure definition */
341 typedef struct
342 {
356  uint32_t RESERVED0[2];
358  uint32_t RESERVED1[12];
361 
362 /*------------- Pulse-Width Modulation (PWM) ---------------------------------*/
363 // PWM Control Register Bit Definitions
364 #define PWMCR_ENABLE_Msk (1 << 0)
365 #define PWMCR_RESET_Msk (1 << 1)
366 /** @brief Pulse-Width Modulation (PWM) register structure definition */
367 typedef struct
368 {
390  uint32_t RESERVED1[7];
393 
394 /*------------- Universal Asynchronous Receiver Transmitter (UART) -----------*/
395 /** @brief Universal Asynchronous Receiver Transmitter (UART) register structure definition */
396 typedef struct
397 {
398  union {
403  };
404  union {
407  };
408  union {
411  };
413  uint8_t RESERVED1[7];
415  uint8_t RESERVED2[7];
417  uint8_t RESERVED3[3];
420  uint8_t RESERVED4[3];
422  uint8_t RESERVED5[7];
424  uint8_t RESERVED6[39];
427 
428 /** @brief Universal Asynchronous Receiver Transmitter 0 (UART0) register structure definition */
429 typedef struct
430 {
431  union {
436  };
437  union {
440  };
441  union {
444  };
446  uint8_t RESERVED1[7];
448  uint8_t RESERVED2[7];
450  uint8_t RESERVED3[3];
453  uint8_t RESERVED4[3];
455  uint8_t RESERVED5[7];
457  uint8_t RESERVED6[39];
460 
461 /** @brief Universal Asynchronous Receiver Transmitter 1 (UART1) register structure definition */
462 typedef struct
463 {
464  union {
469  };
470  union {
473  };
474  union {
477  };
479  uint8_t RESERVED1[3];
481  uint8_t RESERVED2[3];
483  uint8_t RESERVED3[3];
485  uint8_t RESERVED4[3];
487  uint8_t RESERVED5[3];
493  uint8_t RESERVED8[27];
495  uint8_t RESERVED9[3];
497  uint8_t RESERVED10[3];
499  uint8_t RESERVED11[3];
502 
503 /*------------- Serial Peripheral Interface (SPI) ----------------------------*/
504 /** @brief Serial Peripheral Interface (SPI) register structure definition */
505 typedef struct
506 {
511  uint32_t RESERVED0[3];
514 
515 /*------------- Synchronous Serial Communication (SSP) -----------------------*/
516 /** @brief Synchronous Serial Communication (SSP) register structure definition */
517 typedef struct
518 {
530 
531 /*------------- Inter-Integrated Circuit (I2C) -------------------------------*/
532 /** @brief Inter-Integrated Circuit (I2C) register structure definition */
533 typedef struct
534 {
552 
553 /*------------- Inter IC Sound (I2S) -----------------------------------------*/
554 /** @brief Inter IC Sound (I2S) register structure definition */
555 typedef struct
556 {
572 
573 /*------------- Repetitive Interrupt Timer (RIT) -----------------------------*/
574 /** @brief Repetitive Interrupt Timer (RIT) register structure definition */
575 typedef struct
576 {
580  uint8_t RESERVED0[3];
583 
584 /*------------- Real-Time Clock (RTC) ----------------------------------------*/
585 /** @brief Real-Time Clock (RTC) register structure definition */
586 typedef struct
587 {
589  uint8_t RESERVED0[7];
591  uint8_t RESERVED1[3];
593  uint8_t RESERVED2[3];
595  uint8_t RESERVED3[3];
600  uint8_t RESERVED4[3];
602  uint8_t RESERVED5[3];
604  uint8_t RESERVED6[3];
606  uint8_t RESERVED7[3];
608  uint8_t RESERVED8[3];
612  uint8_t RESERVED10[3];
622  uint8_t RESERVED12[3];
624  uint8_t RESERVED13[3];
626  uint8_t RESERVED14[3];
628  uint8_t RESERVED15[3];
630  uint8_t RESERVED16[3];
632  uint8_t RESERVED17[3];
634  uint8_t RESERVED18[3];
638  uint8_t RESERVED20[3];
642 
643 /*------------- Watchdog Timer (WDT) -----------------------------------------*/
644 /** @brief Watchdog Timer (WDT) register structure definition */
645 typedef struct
646 {
648  uint8_t RESERVED0[3];
651  uint8_t RESERVED1[3];
655 
656 /*------------- Analog-to-Digital Converter (ADC) ----------------------------*/
657 /** @brief Analog-to-Digital Converter (ADC) register structure definition */
658 typedef struct
659 {
675 
676 /*------------- Digital-to-Analog Converter (DAC) ----------------------------*/
677 /** @brief Digital-to-Analog Converter (DAC) register structure definition */
678 typedef struct
679 {
684 
685 /*------------- Motor Control Pulse-Width Modulation (MCPWM) -----------------*/
686 /** @brief Motor Control Pulse-Width Modulation (MCPWM) register structure definition */
687 typedef struct
688 {
720 
721 /*------------- Quadrature Encoder Interface (QEI) ---------------------------*/
722 /** @brief Quadrature Encoder Interface (QEI) register structure definition */
723 typedef struct
724 {
741  uint32_t RESERVED0[998];
749 
750 /*------------- Controller Area Network (CAN) --------------------------------*/
751 /** @brief Controller Area Network Acceptance Filter RAM (CANAF_RAM)structure definition */
752 typedef struct
753 {
754  __IO uint32_t mask[512]; /* ID Masks */
756 
757 /** @brief Controller Area Network Acceptance Filter(CANAF) register structure definition */
758 typedef struct /* Acceptance Filter Registers */
759 {
772 
773 /** @brief Controller Area Network Central (CANCR) register structure definition */
774 typedef struct /* Central Registers */
775 {
780 
781 /** @brief Controller Area Network Controller (CAN) register structure definition */
782 typedef struct /* Controller Registers */
783 {
809 
810 /*------------- General Purpose Direct Memory Access (GPDMA) -----------------*/
811 /** @brief General Purpose Direct Memory Access (GPDMA) register structure definition */
812 typedef struct /* Common Registers */
813 {
829 
830 /** @brief General Purpose Direct Memory Access Channel (GPDMACH) register structure definition */
831 typedef struct /* Channel Registers */
832 {
839 
840 /*------------- Universal Serial Bus (USB) -----------------------------------*/
841 /** @brief Universal Serial Bus (USB) register structure definition */
842 typedef struct
843 {
844  __I uint32_t HcRevision; /* USB Host Registers */
867  uint32_t RESERVED0[40];
869 
870  __I uint32_t OTGIntSt; /* USB On-The-Go Registers */
876  uint32_t RESERVED1[58];
877 
878  __I uint32_t USBDevIntSt; /* USB Device Interrupt Registers */
882 
883  __O uint32_t USBCmdCode; /* USB Device SIE Command Registers */
885 
886  __I uint32_t USBRxData; /* USB Device Transfer Registers */
892 
893  __I uint32_t USBEpIntSt; /* USB Device Endpoint Interrupt Regs */
898 
899  __IO uint32_t USBReEp; /* USB Device Endpoint Realization Reg*/
902 
903  __I uint32_t USBDMARSt; /* USB Device DMA Registers */
906  uint32_t RESERVED2[9];
913  uint32_t RESERVED3[2];
923  uint32_t RESERVED4[15];
924 
925  union {
926  __I uint32_t I2C_RX; /* USB OTG I2C Registers */
928  };
933  uint32_t RESERVED5[824];
934 
935  union {
936  __IO uint32_t USBClkCtrl; /* USB Clock Control Registers */
938  };
939  union {
942  };
944 
945 /*------------- Ethernet Media Access Controller (EMAC) ----------------------*/
946 /** @brief Ethernet Media Access Controller (EMAC) register structure definition */
947 typedef struct
948 {
949  __IO uint32_t MAC1; /* MAC Registers */
963  uint32_t RESERVED0[2];
967  uint32_t RESERVED1[45];
968  __IO uint32_t Command; /* Control Registers */
980  uint32_t RESERVED2[10];
984  uint32_t RESERVED3[3];
987  uint32_t RESERVED4[34];
988  __IO uint32_t RxFilterCtrl; /* Rx Filter Registers */
994  uint32_t RESERVED6[882];
995  __I uint32_t IntStatus; /* Module Control Registers */
1004 
1005 
1006 #if defined ( __CC_ARM )
1007 #pragma no_anon_unions
1008 #endif
1009 
1010 
1011 /******************************************************************************/
1012 /* Peripheral memory map */
1013 /******************************************************************************/
1014 /* Base addresses */
1015 #define LPC_FLASH_BASE (0x00000000UL)
1016 #define LPC_RAM_BASE (0x10000000UL)
1017 #ifdef __LPC17XX_REV00
1018 #define LPC_AHBRAM0_BASE (0x20000000UL)
1019 #define LPC_AHBRAM1_BASE (0x20004000UL)
1020 #else
1021 #define LPC_AHBRAM0_BASE (0x2007C000UL)
1022 #define LPC_AHBRAM1_BASE (0x20080000UL)
1023 #endif
1024 #define LPC_GPIO_BASE (0x2009C000UL)
1025 #define LPC_APB0_BASE (0x40000000UL)
1026 #define LPC_APB1_BASE (0x40080000UL)
1027 #define LPC_AHB_BASE (0x50000000UL)
1028 #define LPC_CM3_BASE (0xE0000000UL)
1029 
1030 /* APB0 peripherals */
1031 #define LPC_WDT_BASE (LPC_APB0_BASE + 0x00000)
1032 #define LPC_TIM0_BASE (LPC_APB0_BASE + 0x04000)
1033 #define LPC_TIM1_BASE (LPC_APB0_BASE + 0x08000)
1034 #define LPC_UART0_BASE (LPC_APB0_BASE + 0x0C000)
1035 #define LPC_UART1_BASE (LPC_APB0_BASE + 0x10000)
1036 #define LPC_PWM1_BASE (LPC_APB0_BASE + 0x18000)
1037 #define LPC_I2C0_BASE (LPC_APB0_BASE + 0x1C000)
1038 #define LPC_SPI_BASE (LPC_APB0_BASE + 0x20000)
1039 #define LPC_RTC_BASE (LPC_APB0_BASE + 0x24000)
1040 #define LPC_GPIOINT_BASE (LPC_APB0_BASE + 0x28080)
1041 #define LPC_PINCON_BASE (LPC_APB0_BASE + 0x2C000)
1042 #define LPC_SSP1_BASE (LPC_APB0_BASE + 0x30000)
1043 #define LPC_ADC_BASE (LPC_APB0_BASE + 0x34000)
1044 #define LPC_CANAF_RAM_BASE (LPC_APB0_BASE + 0x38000)
1045 #define LPC_CANAF_BASE (LPC_APB0_BASE + 0x3C000)
1046 #define LPC_CANCR_BASE (LPC_APB0_BASE + 0x40000)
1047 #define LPC_CAN1_BASE (LPC_APB0_BASE + 0x44000)
1048 #define LPC_CAN2_BASE (LPC_APB0_BASE + 0x48000)
1049 #define LPC_I2C1_BASE (LPC_APB0_BASE + 0x5C000)
1050 
1051 /* APB1 peripherals */
1052 #define LPC_SSP0_BASE (LPC_APB1_BASE + 0x08000)
1053 #define LPC_DAC_BASE (LPC_APB1_BASE + 0x0C000)
1054 #define LPC_TIM2_BASE (LPC_APB1_BASE + 0x10000)
1055 #define LPC_TIM3_BASE (LPC_APB1_BASE + 0x14000)
1056 #define LPC_UART2_BASE (LPC_APB1_BASE + 0x18000)
1057 #define LPC_UART3_BASE (LPC_APB1_BASE + 0x1C000)
1058 #define LPC_I2C2_BASE (LPC_APB1_BASE + 0x20000)
1059 #define LPC_I2S_BASE (LPC_APB1_BASE + 0x28000)
1060 #define LPC_RIT_BASE (LPC_APB1_BASE + 0x30000)
1061 #define LPC_MCPWM_BASE (LPC_APB1_BASE + 0x38000)
1062 #define LPC_QEI_BASE (LPC_APB1_BASE + 0x3C000)
1063 #define LPC_SC_BASE (LPC_APB1_BASE + 0x7C000)
1064 
1065 /* AHB peripherals */
1066 #define LPC_EMAC_BASE (LPC_AHB_BASE + 0x00000)
1067 #define LPC_GPDMA_BASE (LPC_AHB_BASE + 0x04000)
1068 #define LPC_GPDMACH0_BASE (LPC_AHB_BASE + 0x04100)
1069 #define LPC_GPDMACH1_BASE (LPC_AHB_BASE + 0x04120)
1070 #define LPC_GPDMACH2_BASE (LPC_AHB_BASE + 0x04140)
1071 #define LPC_GPDMACH3_BASE (LPC_AHB_BASE + 0x04160)
1072 #define LPC_GPDMACH4_BASE (LPC_AHB_BASE + 0x04180)
1073 #define LPC_GPDMACH5_BASE (LPC_AHB_BASE + 0x041A0)
1074 #define LPC_GPDMACH6_BASE (LPC_AHB_BASE + 0x041C0)
1075 #define LPC_GPDMACH7_BASE (LPC_AHB_BASE + 0x041E0)
1076 #define LPC_USB_BASE (LPC_AHB_BASE + 0x0C000)
1077 
1078 /* GPIOs */
1079 #define LPC_GPIO0_BASE (LPC_GPIO_BASE + 0x00000)
1080 #define LPC_GPIO1_BASE (LPC_GPIO_BASE + 0x00020)
1081 #define LPC_GPIO2_BASE (LPC_GPIO_BASE + 0x00040)
1082 #define LPC_GPIO3_BASE (LPC_GPIO_BASE + 0x00060)
1083 #define LPC_GPIO4_BASE (LPC_GPIO_BASE + 0x00080)
1084 
1085 /******************************************************************************/
1086 /* Peripheral declaration */
1087 /******************************************************************************/
1088 #define LPC_SC ((LPC_SC_TypeDef *) LPC_SC_BASE )
1089 #define LPC_GPIO0 ((LPC_GPIO_TypeDef *) LPC_GPIO0_BASE )
1090 #define LPC_GPIO1 ((LPC_GPIO_TypeDef *) LPC_GPIO1_BASE )
1091 #define LPC_GPIO2 ((LPC_GPIO_TypeDef *) LPC_GPIO2_BASE )
1092 #define LPC_GPIO3 ((LPC_GPIO_TypeDef *) LPC_GPIO3_BASE )
1093 #define LPC_GPIO4 ((LPC_GPIO_TypeDef *) LPC_GPIO4_BASE )
1094 #define LPC_WDT ((LPC_WDT_TypeDef *) LPC_WDT_BASE )
1095 #define LPC_TIM0 ((LPC_TIM_TypeDef *) LPC_TIM0_BASE )
1096 #define LPC_TIM1 ((LPC_TIM_TypeDef *) LPC_TIM1_BASE )
1097 #define LPC_TIM2 ((LPC_TIM_TypeDef *) LPC_TIM2_BASE )
1098 #define LPC_TIM3 ((LPC_TIM_TypeDef *) LPC_TIM3_BASE )
1099 #define LPC_RIT ((LPC_RIT_TypeDef *) LPC_RIT_BASE )
1100 #define LPC_UART0 ((LPC_UART_TypeDef *) LPC_UART0_BASE )
1101 #define LPC_UART1 ((LPC_UART1_TypeDef *) LPC_UART1_BASE )
1102 #define LPC_UART2 ((LPC_UART_TypeDef *) LPC_UART2_BASE )
1103 #define LPC_UART3 ((LPC_UART_TypeDef *) LPC_UART3_BASE )
1104 #define LPC_PWM1 ((LPC_PWM_TypeDef *) LPC_PWM1_BASE )
1105 #define LPC_I2C0 ((LPC_I2C_TypeDef *) LPC_I2C0_BASE )
1106 #define LPC_I2C1 ((LPC_I2C_TypeDef *) LPC_I2C1_BASE )
1107 #define LPC_I2C2 ((LPC_I2C_TypeDef *) LPC_I2C2_BASE )
1108 #define LPC_I2S ((LPC_I2S_TypeDef *) LPC_I2S_BASE )
1109 #define LPC_SPI ((LPC_SPI_TypeDef *) LPC_SPI_BASE )
1110 #define LPC_RTC ((LPC_RTC_TypeDef *) LPC_RTC_BASE )
1111 #define LPC_GPIOINT ((LPC_GPIOINT_TypeDef *) LPC_GPIOINT_BASE )
1112 #define LPC_PINCON ((LPC_PINCON_TypeDef *) LPC_PINCON_BASE )
1113 #define LPC_SSP0 ((LPC_SSP_TypeDef *) LPC_SSP0_BASE )
1114 #define LPC_SSP1 ((LPC_SSP_TypeDef *) LPC_SSP1_BASE )
1115 #define LPC_ADC ((LPC_ADC_TypeDef *) LPC_ADC_BASE )
1116 #define LPC_DAC ((LPC_DAC_TypeDef *) LPC_DAC_BASE )
1117 #define LPC_CANAF_RAM ((LPC_CANAF_RAM_TypeDef *) LPC_CANAF_RAM_BASE)
1118 #define LPC_CANAF ((LPC_CANAF_TypeDef *) LPC_CANAF_BASE )
1119 #define LPC_CANCR ((LPC_CANCR_TypeDef *) LPC_CANCR_BASE )
1120 #define LPC_CAN1 ((LPC_CAN_TypeDef *) LPC_CAN1_BASE )
1121 #define LPC_CAN2 ((LPC_CAN_TypeDef *) LPC_CAN2_BASE )
1122 #define LPC_MCPWM ((LPC_MCPWM_TypeDef *) LPC_MCPWM_BASE )
1123 #define LPC_QEI ((LPC_QEI_TypeDef *) LPC_QEI_BASE )
1124 #define LPC_EMAC ((LPC_EMAC_TypeDef *) LPC_EMAC_BASE )
1125 #define LPC_GPDMA ((LPC_GPDMA_TypeDef *) LPC_GPDMA_BASE )
1126 #define LPC_GPDMACH0 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH0_BASE )
1127 #define LPC_GPDMACH1 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH1_BASE )
1128 #define LPC_GPDMACH2 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH2_BASE )
1129 #define LPC_GPDMACH3 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH3_BASE )
1130 #define LPC_GPDMACH4 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH4_BASE )
1131 #define LPC_GPDMACH5 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH5_BASE )
1132 #define LPC_GPDMACH6 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH6_BASE )
1133 #define LPC_GPDMACH7 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH7_BASE )
1134 #define LPC_USB ((LPC_USB_TypeDef *) LPC_USB_BASE )
1135 
1136 /**
1137  * @}
1138  */
1139 
1140 #endif // __LPC17xx_H__