Programme d'utilisation servomotors MX12 V1

Committer:
R66Y
Date:
Fri May 19 14:32:14 2017 +0000
Revision:
0:80df663dd15e
programme pour utiliser les servomoteurs MX12.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
R66Y 0:80df663dd15e 1 /**************************************************************************//**
R66Y 0:80df663dd15e 2 * @file LPC17xx.h
R66Y 0:80df663dd15e 3 * @brief CMSIS Cortex-M3 Core Peripheral Access Layer Header File for
R66Y 0:80df663dd15e 4 * NXP LPC17xx Device Series
R66Y 0:80df663dd15e 5 * @version: V1.09
R66Y 0:80df663dd15e 6 * @date: 17. March 2010
R66Y 0:80df663dd15e 7
R66Y 0:80df663dd15e 8 *
R66Y 0:80df663dd15e 9 * @note
R66Y 0:80df663dd15e 10 * Copyright (C) 2009 ARM Limited. All rights reserved.
R66Y 0:80df663dd15e 11 *
R66Y 0:80df663dd15e 12 * @par
R66Y 0:80df663dd15e 13 * ARM Limited (ARM) is supplying this software for use with Cortex-M
R66Y 0:80df663dd15e 14 * processor based microcontrollers. This file can be freely distributed
R66Y 0:80df663dd15e 15 * within development tools that are supporting such ARM based processors.
R66Y 0:80df663dd15e 16 *
R66Y 0:80df663dd15e 17 * @par
R66Y 0:80df663dd15e 18 * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
R66Y 0:80df663dd15e 19 * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
R66Y 0:80df663dd15e 20 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
R66Y 0:80df663dd15e 21 * ARM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
R66Y 0:80df663dd15e 22 * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
R66Y 0:80df663dd15e 23 *
R66Y 0:80df663dd15e 24 ******************************************************************************/
R66Y 0:80df663dd15e 25
R66Y 0:80df663dd15e 26
R66Y 0:80df663dd15e 27 #ifndef __LPC17xx_H__
R66Y 0:80df663dd15e 28 #define __LPC17xx_H__
R66Y 0:80df663dd15e 29
R66Y 0:80df663dd15e 30 /*
R66Y 0:80df663dd15e 31 * ==========================================================================
R66Y 0:80df663dd15e 32 * ---------- Interrupt Number Definition -----------------------------------
R66Y 0:80df663dd15e 33 * ==========================================================================
R66Y 0:80df663dd15e 34 */
R66Y 0:80df663dd15e 35
R66Y 0:80df663dd15e 36 typedef enum IRQn
R66Y 0:80df663dd15e 37 {
R66Y 0:80df663dd15e 38 /****** Cortex-M3 Processor Exceptions Numbers ***************************************************/
R66Y 0:80df663dd15e 39 NonMaskableInt_IRQn = -14, /*!< 2 Non Maskable Interrupt */
R66Y 0:80df663dd15e 40 MemoryManagement_IRQn = -12, /*!< 4 Cortex-M3 Memory Management Interrupt */
R66Y 0:80df663dd15e 41 BusFault_IRQn = -11, /*!< 5 Cortex-M3 Bus Fault Interrupt */
R66Y 0:80df663dd15e 42 UsageFault_IRQn = -10, /*!< 6 Cortex-M3 Usage Fault Interrupt */
R66Y 0:80df663dd15e 43 SVCall_IRQn = -5, /*!< 11 Cortex-M3 SV Call Interrupt */
R66Y 0:80df663dd15e 44 DebugMonitor_IRQn = -4, /*!< 12 Cortex-M3 Debug Monitor Interrupt */
R66Y 0:80df663dd15e 45 PendSV_IRQn = -2, /*!< 14 Cortex-M3 Pend SV Interrupt */
R66Y 0:80df663dd15e 46 SysTick_IRQn = -1, /*!< 15 Cortex-M3 System Tick Interrupt */
R66Y 0:80df663dd15e 47
R66Y 0:80df663dd15e 48 /****** LPC17xx Specific Interrupt Numbers *******************************************************/
R66Y 0:80df663dd15e 49 WDT_IRQn = 0, /*!< Watchdog Timer Interrupt */
R66Y 0:80df663dd15e 50 TIMER0_IRQn = 1, /*!< Timer0 Interrupt */
R66Y 0:80df663dd15e 51 TIMER1_IRQn = 2, /*!< Timer1 Interrupt */
R66Y 0:80df663dd15e 52 TIMER2_IRQn = 3, /*!< Timer2 Interrupt */
R66Y 0:80df663dd15e 53 TIMER3_IRQn = 4, /*!< Timer3 Interrupt */
R66Y 0:80df663dd15e 54 UART0_IRQn = 5, /*!< UART0 Interrupt */
R66Y 0:80df663dd15e 55 UART1_IRQn = 6, /*!< UART1 Interrupt */
R66Y 0:80df663dd15e 56 UART2_IRQn = 7, /*!< UART2 Interrupt */
R66Y 0:80df663dd15e 57 UART3_IRQn = 8, /*!< UART3 Interrupt */
R66Y 0:80df663dd15e 58 PWM1_IRQn = 9, /*!< PWM1 Interrupt */
R66Y 0:80df663dd15e 59 I2C0_IRQn = 10, /*!< I2C0 Interrupt */
R66Y 0:80df663dd15e 60 I2C1_IRQn = 11, /*!< I2C1 Interrupt */
R66Y 0:80df663dd15e 61 I2C2_IRQn = 12, /*!< I2C2 Interrupt */
R66Y 0:80df663dd15e 62 SPI_IRQn = 13, /*!< SPI Interrupt */
R66Y 0:80df663dd15e 63 SSP0_IRQn = 14, /*!< SSP0 Interrupt */
R66Y 0:80df663dd15e 64 SSP1_IRQn = 15, /*!< SSP1 Interrupt */
R66Y 0:80df663dd15e 65 PLL0_IRQn = 16, /*!< PLL0 Lock (Main PLL) Interrupt */
R66Y 0:80df663dd15e 66 RTC_IRQn = 17, /*!< Real Time Clock Interrupt */
R66Y 0:80df663dd15e 67 EINT0_IRQn = 18, /*!< External Interrupt 0 Interrupt */
R66Y 0:80df663dd15e 68 EINT1_IRQn = 19, /*!< External Interrupt 1 Interrupt */
R66Y 0:80df663dd15e 69 EINT2_IRQn = 20, /*!< External Interrupt 2 Interrupt */
R66Y 0:80df663dd15e 70 EINT3_IRQn = 21, /*!< External Interrupt 3 Interrupt */
R66Y 0:80df663dd15e 71 ADC_IRQn = 22, /*!< A/D Converter Interrupt */
R66Y 0:80df663dd15e 72 BOD_IRQn = 23, /*!< Brown-Out Detect Interrupt */
R66Y 0:80df663dd15e 73 USB_IRQn = 24, /*!< USB Interrupt */
R66Y 0:80df663dd15e 74 CAN_IRQn = 25, /*!< CAN Interrupt */
R66Y 0:80df663dd15e 75 DMA_IRQn = 26, /*!< General Purpose DMA Interrupt */
R66Y 0:80df663dd15e 76 I2S_IRQn = 27, /*!< I2S Interrupt */
R66Y 0:80df663dd15e 77 ENET_IRQn = 28, /*!< Ethernet Interrupt */
R66Y 0:80df663dd15e 78 RIT_IRQn = 29, /*!< Repetitive Interrupt Timer Interrupt */
R66Y 0:80df663dd15e 79 MCPWM_IRQn = 30, /*!< Motor Control PWM Interrupt */
R66Y 0:80df663dd15e 80 QEI_IRQn = 31, /*!< Quadrature Encoder Interface Interrupt */
R66Y 0:80df663dd15e 81 PLL1_IRQn = 32, /*!< PLL1 Lock (USB PLL) Interrupt */
R66Y 0:80df663dd15e 82 USBActivity_IRQn = 33, /* USB Activity interrupt */
R66Y 0:80df663dd15e 83 CANActivity_IRQn = 34, /* CAN Activity interrupt */
R66Y 0:80df663dd15e 84 } IRQn_Type;
R66Y 0:80df663dd15e 85
R66Y 0:80df663dd15e 86
R66Y 0:80df663dd15e 87 /*
R66Y 0:80df663dd15e 88 * ==========================================================================
R66Y 0:80df663dd15e 89 * ----------- Processor and Core Peripheral Section ------------------------
R66Y 0:80df663dd15e 90 * ==========================================================================
R66Y 0:80df663dd15e 91 */
R66Y 0:80df663dd15e 92
R66Y 0:80df663dd15e 93 /* Configuration of the Cortex-M3 Processor and Core Peripherals */
R66Y 0:80df663dd15e 94 #define __MPU_PRESENT 1 /*!< MPU present or not */
R66Y 0:80df663dd15e 95 #define __NVIC_PRIO_BITS 5 /*!< Number of Bits used for Priority Levels */
R66Y 0:80df663dd15e 96 #define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */
R66Y 0:80df663dd15e 97
R66Y 0:80df663dd15e 98
R66Y 0:80df663dd15e 99 #include "core_cm3.h" /* Cortex-M3 processor and core peripherals */
R66Y 0:80df663dd15e 100 #include "system_LPC17xx.h" /* System Header */
R66Y 0:80df663dd15e 101
R66Y 0:80df663dd15e 102
R66Y 0:80df663dd15e 103 /******************************************************************************/
R66Y 0:80df663dd15e 104 /* Device Specific Peripheral registers structures */
R66Y 0:80df663dd15e 105 /******************************************************************************/
R66Y 0:80df663dd15e 106
R66Y 0:80df663dd15e 107 #if defined ( __CC_ARM )
R66Y 0:80df663dd15e 108 #pragma anon_unions
R66Y 0:80df663dd15e 109 #endif
R66Y 0:80df663dd15e 110
R66Y 0:80df663dd15e 111 /*------------- System Control (SC) ------------------------------------------*/
R66Y 0:80df663dd15e 112 typedef struct
R66Y 0:80df663dd15e 113 {
R66Y 0:80df663dd15e 114 __IO uint32_t FLASHCFG; /* Flash Accelerator Module */
R66Y 0:80df663dd15e 115 uint32_t RESERVED0[31];
R66Y 0:80df663dd15e 116 __IO uint32_t PLL0CON; /* Clocking and Power Control */
R66Y 0:80df663dd15e 117 __IO uint32_t PLL0CFG;
R66Y 0:80df663dd15e 118 __I uint32_t PLL0STAT;
R66Y 0:80df663dd15e 119 __O uint32_t PLL0FEED;
R66Y 0:80df663dd15e 120 uint32_t RESERVED1[4];
R66Y 0:80df663dd15e 121 __IO uint32_t PLL1CON;
R66Y 0:80df663dd15e 122 __IO uint32_t PLL1CFG;
R66Y 0:80df663dd15e 123 __I uint32_t PLL1STAT;
R66Y 0:80df663dd15e 124 __O uint32_t PLL1FEED;
R66Y 0:80df663dd15e 125 uint32_t RESERVED2[4];
R66Y 0:80df663dd15e 126 __IO uint32_t PCON;
R66Y 0:80df663dd15e 127 __IO uint32_t PCONP;
R66Y 0:80df663dd15e 128 uint32_t RESERVED3[15];
R66Y 0:80df663dd15e 129 __IO uint32_t CCLKCFG;
R66Y 0:80df663dd15e 130 __IO uint32_t USBCLKCFG;
R66Y 0:80df663dd15e 131 __IO uint32_t CLKSRCSEL;
R66Y 0:80df663dd15e 132 __IO uint32_t CANSLEEPCLR;
R66Y 0:80df663dd15e 133 __IO uint32_t CANWAKEFLAGS;
R66Y 0:80df663dd15e 134 uint32_t RESERVED4[10];
R66Y 0:80df663dd15e 135 __IO uint32_t EXTINT; /* External Interrupts */
R66Y 0:80df663dd15e 136 uint32_t RESERVED5;
R66Y 0:80df663dd15e 137 __IO uint32_t EXTMODE;
R66Y 0:80df663dd15e 138 __IO uint32_t EXTPOLAR;
R66Y 0:80df663dd15e 139 uint32_t RESERVED6[12];
R66Y 0:80df663dd15e 140 __IO uint32_t RSID; /* Reset */
R66Y 0:80df663dd15e 141 uint32_t RESERVED7[7];
R66Y 0:80df663dd15e 142 __IO uint32_t SCS; /* Syscon Miscellaneous Registers */
R66Y 0:80df663dd15e 143 __IO uint32_t IRCTRIM; /* Clock Dividers */
R66Y 0:80df663dd15e 144 __IO uint32_t PCLKSEL0;
R66Y 0:80df663dd15e 145 __IO uint32_t PCLKSEL1;
R66Y 0:80df663dd15e 146 uint32_t RESERVED8[4];
R66Y 0:80df663dd15e 147 __IO uint32_t USBIntSt; /* USB Device/OTG Interrupt Register */
R66Y 0:80df663dd15e 148 __IO uint32_t DMAREQSEL;
R66Y 0:80df663dd15e 149 __IO uint32_t CLKOUTCFG; /* Clock Output Configuration */
R66Y 0:80df663dd15e 150 } LPC_SC_TypeDef;
R66Y 0:80df663dd15e 151
R66Y 0:80df663dd15e 152 /*------------- Pin Connect Block (PINCON) -----------------------------------*/
R66Y 0:80df663dd15e 153 typedef struct
R66Y 0:80df663dd15e 154 {
R66Y 0:80df663dd15e 155 __IO uint32_t PINSEL0;
R66Y 0:80df663dd15e 156 __IO uint32_t PINSEL1;
R66Y 0:80df663dd15e 157 __IO uint32_t PINSEL2;
R66Y 0:80df663dd15e 158 __IO uint32_t PINSEL3;
R66Y 0:80df663dd15e 159 __IO uint32_t PINSEL4;
R66Y 0:80df663dd15e 160 __IO uint32_t PINSEL5;
R66Y 0:80df663dd15e 161 __IO uint32_t PINSEL6;
R66Y 0:80df663dd15e 162 __IO uint32_t PINSEL7;
R66Y 0:80df663dd15e 163 __IO uint32_t PINSEL8;
R66Y 0:80df663dd15e 164 __IO uint32_t PINSEL9;
R66Y 0:80df663dd15e 165 __IO uint32_t PINSEL10;
R66Y 0:80df663dd15e 166 uint32_t RESERVED0[5];
R66Y 0:80df663dd15e 167 __IO uint32_t PINMODE0;
R66Y 0:80df663dd15e 168 __IO uint32_t PINMODE1;
R66Y 0:80df663dd15e 169 __IO uint32_t PINMODE2;
R66Y 0:80df663dd15e 170 __IO uint32_t PINMODE3;
R66Y 0:80df663dd15e 171 __IO uint32_t PINMODE4;
R66Y 0:80df663dd15e 172 __IO uint32_t PINMODE5;
R66Y 0:80df663dd15e 173 __IO uint32_t PINMODE6;
R66Y 0:80df663dd15e 174 __IO uint32_t PINMODE7;
R66Y 0:80df663dd15e 175 __IO uint32_t PINMODE8;
R66Y 0:80df663dd15e 176 __IO uint32_t PINMODE9;
R66Y 0:80df663dd15e 177 __IO uint32_t PINMODE_OD0;
R66Y 0:80df663dd15e 178 __IO uint32_t PINMODE_OD1;
R66Y 0:80df663dd15e 179 __IO uint32_t PINMODE_OD2;
R66Y 0:80df663dd15e 180 __IO uint32_t PINMODE_OD3;
R66Y 0:80df663dd15e 181 __IO uint32_t PINMODE_OD4;
R66Y 0:80df663dd15e 182 __IO uint32_t I2CPADCFG;
R66Y 0:80df663dd15e 183 } LPC_PINCON_TypeDef;
R66Y 0:80df663dd15e 184
R66Y 0:80df663dd15e 185 /*------------- General Purpose Input/Output (GPIO) --------------------------*/
R66Y 0:80df663dd15e 186 typedef struct
R66Y 0:80df663dd15e 187 {
R66Y 0:80df663dd15e 188 union {
R66Y 0:80df663dd15e 189 __IO uint32_t FIODIR;
R66Y 0:80df663dd15e 190 struct {
R66Y 0:80df663dd15e 191 __IO uint16_t FIODIRL;
R66Y 0:80df663dd15e 192 __IO uint16_t FIODIRH;
R66Y 0:80df663dd15e 193 };
R66Y 0:80df663dd15e 194 struct {
R66Y 0:80df663dd15e 195 __IO uint8_t FIODIR0;
R66Y 0:80df663dd15e 196 __IO uint8_t FIODIR1;
R66Y 0:80df663dd15e 197 __IO uint8_t FIODIR2;
R66Y 0:80df663dd15e 198 __IO uint8_t FIODIR3;
R66Y 0:80df663dd15e 199 };
R66Y 0:80df663dd15e 200 };
R66Y 0:80df663dd15e 201 uint32_t RESERVED0[3];
R66Y 0:80df663dd15e 202 union {
R66Y 0:80df663dd15e 203 __IO uint32_t FIOMASK;
R66Y 0:80df663dd15e 204 struct {
R66Y 0:80df663dd15e 205 __IO uint16_t FIOMASKL;
R66Y 0:80df663dd15e 206 __IO uint16_t FIOMASKH;
R66Y 0:80df663dd15e 207 };
R66Y 0:80df663dd15e 208 struct {
R66Y 0:80df663dd15e 209 __IO uint8_t FIOMASK0;
R66Y 0:80df663dd15e 210 __IO uint8_t FIOMASK1;
R66Y 0:80df663dd15e 211 __IO uint8_t FIOMASK2;
R66Y 0:80df663dd15e 212 __IO uint8_t FIOMASK3;
R66Y 0:80df663dd15e 213 };
R66Y 0:80df663dd15e 214 };
R66Y 0:80df663dd15e 215 union {
R66Y 0:80df663dd15e 216 __IO uint32_t FIOPIN;
R66Y 0:80df663dd15e 217 struct {
R66Y 0:80df663dd15e 218 __IO uint16_t FIOPINL;
R66Y 0:80df663dd15e 219 __IO uint16_t FIOPINH;
R66Y 0:80df663dd15e 220 };
R66Y 0:80df663dd15e 221 struct {
R66Y 0:80df663dd15e 222 __IO uint8_t FIOPIN0;
R66Y 0:80df663dd15e 223 __IO uint8_t FIOPIN1;
R66Y 0:80df663dd15e 224 __IO uint8_t FIOPIN2;
R66Y 0:80df663dd15e 225 __IO uint8_t FIOPIN3;
R66Y 0:80df663dd15e 226 };
R66Y 0:80df663dd15e 227 };
R66Y 0:80df663dd15e 228 union {
R66Y 0:80df663dd15e 229 __IO uint32_t FIOSET;
R66Y 0:80df663dd15e 230 struct {
R66Y 0:80df663dd15e 231 __IO uint16_t FIOSETL;
R66Y 0:80df663dd15e 232 __IO uint16_t FIOSETH;
R66Y 0:80df663dd15e 233 };
R66Y 0:80df663dd15e 234 struct {
R66Y 0:80df663dd15e 235 __IO uint8_t FIOSET0;
R66Y 0:80df663dd15e 236 __IO uint8_t FIOSET1;
R66Y 0:80df663dd15e 237 __IO uint8_t FIOSET2;
R66Y 0:80df663dd15e 238 __IO uint8_t FIOSET3;
R66Y 0:80df663dd15e 239 };
R66Y 0:80df663dd15e 240 };
R66Y 0:80df663dd15e 241 union {
R66Y 0:80df663dd15e 242 __O uint32_t FIOCLR;
R66Y 0:80df663dd15e 243 struct {
R66Y 0:80df663dd15e 244 __O uint16_t FIOCLRL;
R66Y 0:80df663dd15e 245 __O uint16_t FIOCLRH;
R66Y 0:80df663dd15e 246 };
R66Y 0:80df663dd15e 247 struct {
R66Y 0:80df663dd15e 248 __O uint8_t FIOCLR0;
R66Y 0:80df663dd15e 249 __O uint8_t FIOCLR1;
R66Y 0:80df663dd15e 250 __O uint8_t FIOCLR2;
R66Y 0:80df663dd15e 251 __O uint8_t FIOCLR3;
R66Y 0:80df663dd15e 252 };
R66Y 0:80df663dd15e 253 };
R66Y 0:80df663dd15e 254 } LPC_GPIO_TypeDef;
R66Y 0:80df663dd15e 255
R66Y 0:80df663dd15e 256 typedef struct
R66Y 0:80df663dd15e 257 {
R66Y 0:80df663dd15e 258 __I uint32_t IntStatus;
R66Y 0:80df663dd15e 259 __I uint32_t IO0IntStatR;
R66Y 0:80df663dd15e 260 __I uint32_t IO0IntStatF;
R66Y 0:80df663dd15e 261 __O uint32_t IO0IntClr;
R66Y 0:80df663dd15e 262 __IO uint32_t IO0IntEnR;
R66Y 0:80df663dd15e 263 __IO uint32_t IO0IntEnF;
R66Y 0:80df663dd15e 264 uint32_t RESERVED0[3];
R66Y 0:80df663dd15e 265 __I uint32_t IO2IntStatR;
R66Y 0:80df663dd15e 266 __I uint32_t IO2IntStatF;
R66Y 0:80df663dd15e 267 __O uint32_t IO2IntClr;
R66Y 0:80df663dd15e 268 __IO uint32_t IO2IntEnR;
R66Y 0:80df663dd15e 269 __IO uint32_t IO2IntEnF;
R66Y 0:80df663dd15e 270 } LPC_GPIOINT_TypeDef;
R66Y 0:80df663dd15e 271
R66Y 0:80df663dd15e 272 /*------------- Timer (TIM) --------------------------------------------------*/
R66Y 0:80df663dd15e 273 typedef struct
R66Y 0:80df663dd15e 274 {
R66Y 0:80df663dd15e 275 __IO uint32_t IR;
R66Y 0:80df663dd15e 276 __IO uint32_t TCR;
R66Y 0:80df663dd15e 277 __IO uint32_t TC;
R66Y 0:80df663dd15e 278 __IO uint32_t PR;
R66Y 0:80df663dd15e 279 __IO uint32_t PC;
R66Y 0:80df663dd15e 280 __IO uint32_t MCR;
R66Y 0:80df663dd15e 281 __IO uint32_t MR0;
R66Y 0:80df663dd15e 282 __IO uint32_t MR1;
R66Y 0:80df663dd15e 283 __IO uint32_t MR2;
R66Y 0:80df663dd15e 284 __IO uint32_t MR3;
R66Y 0:80df663dd15e 285 __IO uint32_t CCR;
R66Y 0:80df663dd15e 286 __I uint32_t CR0;
R66Y 0:80df663dd15e 287 __I uint32_t CR1;
R66Y 0:80df663dd15e 288 uint32_t RESERVED0[2];
R66Y 0:80df663dd15e 289 __IO uint32_t EMR;
R66Y 0:80df663dd15e 290 uint32_t RESERVED1[12];
R66Y 0:80df663dd15e 291 __IO uint32_t CTCR;
R66Y 0:80df663dd15e 292 } LPC_TIM_TypeDef;
R66Y 0:80df663dd15e 293
R66Y 0:80df663dd15e 294 /*------------- Pulse-Width Modulation (PWM) ---------------------------------*/
R66Y 0:80df663dd15e 295 typedef struct
R66Y 0:80df663dd15e 296 {
R66Y 0:80df663dd15e 297 __IO uint32_t IR;
R66Y 0:80df663dd15e 298 __IO uint32_t TCR;
R66Y 0:80df663dd15e 299 __IO uint32_t TC;
R66Y 0:80df663dd15e 300 __IO uint32_t PR;
R66Y 0:80df663dd15e 301 __IO uint32_t PC;
R66Y 0:80df663dd15e 302 __IO uint32_t MCR;
R66Y 0:80df663dd15e 303 __IO uint32_t MR0;
R66Y 0:80df663dd15e 304 __IO uint32_t MR1;
R66Y 0:80df663dd15e 305 __IO uint32_t MR2;
R66Y 0:80df663dd15e 306 __IO uint32_t MR3;
R66Y 0:80df663dd15e 307 __IO uint32_t CCR;
R66Y 0:80df663dd15e 308 __I uint32_t CR0;
R66Y 0:80df663dd15e 309 __I uint32_t CR1;
R66Y 0:80df663dd15e 310 __I uint32_t CR2;
R66Y 0:80df663dd15e 311 __I uint32_t CR3;
R66Y 0:80df663dd15e 312 uint32_t RESERVED0;
R66Y 0:80df663dd15e 313 __IO uint32_t MR4;
R66Y 0:80df663dd15e 314 __IO uint32_t MR5;
R66Y 0:80df663dd15e 315 __IO uint32_t MR6;
R66Y 0:80df663dd15e 316 __IO uint32_t PCR;
R66Y 0:80df663dd15e 317 __IO uint32_t LER;
R66Y 0:80df663dd15e 318 uint32_t RESERVED1[7];
R66Y 0:80df663dd15e 319 __IO uint32_t CTCR;
R66Y 0:80df663dd15e 320 } LPC_PWM_TypeDef;
R66Y 0:80df663dd15e 321
R66Y 0:80df663dd15e 322 /*------------- Universal Asynchronous Receiver Transmitter (UART) -----------*/
R66Y 0:80df663dd15e 323 typedef struct
R66Y 0:80df663dd15e 324 {
R66Y 0:80df663dd15e 325 union {
R66Y 0:80df663dd15e 326 __I uint8_t RBR;
R66Y 0:80df663dd15e 327 __O uint8_t THR;
R66Y 0:80df663dd15e 328 __IO uint8_t DLL;
R66Y 0:80df663dd15e 329 uint32_t RESERVED0;
R66Y 0:80df663dd15e 330 };
R66Y 0:80df663dd15e 331 union {
R66Y 0:80df663dd15e 332 __IO uint8_t DLM;
R66Y 0:80df663dd15e 333 __IO uint32_t IER;
R66Y 0:80df663dd15e 334 };
R66Y 0:80df663dd15e 335 union {
R66Y 0:80df663dd15e 336 __I uint32_t IIR;
R66Y 0:80df663dd15e 337 __O uint8_t FCR;
R66Y 0:80df663dd15e 338 };
R66Y 0:80df663dd15e 339 __IO uint8_t LCR;
R66Y 0:80df663dd15e 340 uint8_t RESERVED1[7];
R66Y 0:80df663dd15e 341 __I uint8_t LSR;
R66Y 0:80df663dd15e 342 uint8_t RESERVED2[7];
R66Y 0:80df663dd15e 343 __IO uint8_t SCR;
R66Y 0:80df663dd15e 344 uint8_t RESERVED3[3];
R66Y 0:80df663dd15e 345 __IO uint32_t ACR;
R66Y 0:80df663dd15e 346 __IO uint8_t ICR;
R66Y 0:80df663dd15e 347 uint8_t RESERVED4[3];
R66Y 0:80df663dd15e 348 __IO uint8_t FDR;
R66Y 0:80df663dd15e 349 uint8_t RESERVED5[7];
R66Y 0:80df663dd15e 350 __IO uint8_t TER;
R66Y 0:80df663dd15e 351 uint8_t RESERVED6[39];
R66Y 0:80df663dd15e 352 __IO uint32_t FIFOLVL;
R66Y 0:80df663dd15e 353 } LPC_UART_TypeDef;
R66Y 0:80df663dd15e 354
R66Y 0:80df663dd15e 355 typedef struct
R66Y 0:80df663dd15e 356 {
R66Y 0:80df663dd15e 357 union {
R66Y 0:80df663dd15e 358 __I uint8_t RBR;
R66Y 0:80df663dd15e 359 __O uint8_t THR;
R66Y 0:80df663dd15e 360 __IO uint8_t DLL;
R66Y 0:80df663dd15e 361 uint32_t RESERVED0;
R66Y 0:80df663dd15e 362 };
R66Y 0:80df663dd15e 363 union {
R66Y 0:80df663dd15e 364 __IO uint8_t DLM;
R66Y 0:80df663dd15e 365 __IO uint32_t IER;
R66Y 0:80df663dd15e 366 };
R66Y 0:80df663dd15e 367 union {
R66Y 0:80df663dd15e 368 __I uint32_t IIR;
R66Y 0:80df663dd15e 369 __O uint8_t FCR;
R66Y 0:80df663dd15e 370 };
R66Y 0:80df663dd15e 371 __IO uint8_t LCR;
R66Y 0:80df663dd15e 372 uint8_t RESERVED1[7];
R66Y 0:80df663dd15e 373 __I uint8_t LSR;
R66Y 0:80df663dd15e 374 uint8_t RESERVED2[7];
R66Y 0:80df663dd15e 375 __IO uint8_t SCR;
R66Y 0:80df663dd15e 376 uint8_t RESERVED3[3];
R66Y 0:80df663dd15e 377 __IO uint32_t ACR;
R66Y 0:80df663dd15e 378 __IO uint8_t ICR;
R66Y 0:80df663dd15e 379 uint8_t RESERVED4[3];
R66Y 0:80df663dd15e 380 __IO uint8_t FDR;
R66Y 0:80df663dd15e 381 uint8_t RESERVED5[7];
R66Y 0:80df663dd15e 382 __IO uint8_t TER;
R66Y 0:80df663dd15e 383 uint8_t RESERVED6[39];
R66Y 0:80df663dd15e 384 __IO uint32_t FIFOLVL;
R66Y 0:80df663dd15e 385 } LPC_UART0_TypeDef;
R66Y 0:80df663dd15e 386
R66Y 0:80df663dd15e 387 typedef struct
R66Y 0:80df663dd15e 388 {
R66Y 0:80df663dd15e 389 union {
R66Y 0:80df663dd15e 390 __I uint8_t RBR;
R66Y 0:80df663dd15e 391 __O uint8_t THR;
R66Y 0:80df663dd15e 392 __IO uint8_t DLL;
R66Y 0:80df663dd15e 393 uint32_t RESERVED0;
R66Y 0:80df663dd15e 394 };
R66Y 0:80df663dd15e 395 union {
R66Y 0:80df663dd15e 396 __IO uint8_t DLM;
R66Y 0:80df663dd15e 397 __IO uint32_t IER;
R66Y 0:80df663dd15e 398 };
R66Y 0:80df663dd15e 399 union {
R66Y 0:80df663dd15e 400 __I uint32_t IIR;
R66Y 0:80df663dd15e 401 __O uint8_t FCR;
R66Y 0:80df663dd15e 402 };
R66Y 0:80df663dd15e 403 __IO uint8_t LCR;
R66Y 0:80df663dd15e 404 uint8_t RESERVED1[3];
R66Y 0:80df663dd15e 405 __IO uint8_t MCR;
R66Y 0:80df663dd15e 406 uint8_t RESERVED2[3];
R66Y 0:80df663dd15e 407 __I uint8_t LSR;
R66Y 0:80df663dd15e 408 uint8_t RESERVED3[3];
R66Y 0:80df663dd15e 409 __I uint8_t MSR;
R66Y 0:80df663dd15e 410 uint8_t RESERVED4[3];
R66Y 0:80df663dd15e 411 __IO uint8_t SCR;
R66Y 0:80df663dd15e 412 uint8_t RESERVED5[3];
R66Y 0:80df663dd15e 413 __IO uint32_t ACR;
R66Y 0:80df663dd15e 414 uint32_t RESERVED6;
R66Y 0:80df663dd15e 415 __IO uint32_t FDR;
R66Y 0:80df663dd15e 416 uint32_t RESERVED7;
R66Y 0:80df663dd15e 417 __IO uint8_t TER;
R66Y 0:80df663dd15e 418 uint8_t RESERVED8[27];
R66Y 0:80df663dd15e 419 __IO uint8_t RS485CTRL;
R66Y 0:80df663dd15e 420 uint8_t RESERVED9[3];
R66Y 0:80df663dd15e 421 __IO uint8_t ADRMATCH;
R66Y 0:80df663dd15e 422 uint8_t RESERVED10[3];
R66Y 0:80df663dd15e 423 __IO uint8_t RS485DLY;
R66Y 0:80df663dd15e 424 uint8_t RESERVED11[3];
R66Y 0:80df663dd15e 425 __IO uint32_t FIFOLVL;
R66Y 0:80df663dd15e 426 } LPC_UART1_TypeDef;
R66Y 0:80df663dd15e 427
R66Y 0:80df663dd15e 428 /*------------- Serial Peripheral Interface (SPI) ----------------------------*/
R66Y 0:80df663dd15e 429 typedef struct
R66Y 0:80df663dd15e 430 {
R66Y 0:80df663dd15e 431 __IO uint32_t SPCR;
R66Y 0:80df663dd15e 432 __I uint32_t SPSR;
R66Y 0:80df663dd15e 433 __IO uint32_t SPDR;
R66Y 0:80df663dd15e 434 __IO uint32_t SPCCR;
R66Y 0:80df663dd15e 435 uint32_t RESERVED0[3];
R66Y 0:80df663dd15e 436 __IO uint32_t SPINT;
R66Y 0:80df663dd15e 437 } LPC_SPI_TypeDef;
R66Y 0:80df663dd15e 438
R66Y 0:80df663dd15e 439 /*------------- Synchronous Serial Communication (SSP) -----------------------*/
R66Y 0:80df663dd15e 440 typedef struct
R66Y 0:80df663dd15e 441 {
R66Y 0:80df663dd15e 442 __IO uint32_t CR0;
R66Y 0:80df663dd15e 443 __IO uint32_t CR1;
R66Y 0:80df663dd15e 444 __IO uint32_t DR;
R66Y 0:80df663dd15e 445 __I uint32_t SR;
R66Y 0:80df663dd15e 446 __IO uint32_t CPSR;
R66Y 0:80df663dd15e 447 __IO uint32_t IMSC;
R66Y 0:80df663dd15e 448 __IO uint32_t RIS;
R66Y 0:80df663dd15e 449 __IO uint32_t MIS;
R66Y 0:80df663dd15e 450 __IO uint32_t ICR;
R66Y 0:80df663dd15e 451 __IO uint32_t DMACR;
R66Y 0:80df663dd15e 452 } LPC_SSP_TypeDef;
R66Y 0:80df663dd15e 453
R66Y 0:80df663dd15e 454 /*------------- Inter-Integrated Circuit (I2C) -------------------------------*/
R66Y 0:80df663dd15e 455 typedef struct
R66Y 0:80df663dd15e 456 {
R66Y 0:80df663dd15e 457 __IO uint32_t I2CONSET;
R66Y 0:80df663dd15e 458 __I uint32_t I2STAT;
R66Y 0:80df663dd15e 459 __IO uint32_t I2DAT;
R66Y 0:80df663dd15e 460 __IO uint32_t I2ADR0;
R66Y 0:80df663dd15e 461 __IO uint32_t I2SCLH;
R66Y 0:80df663dd15e 462 __IO uint32_t I2SCLL;
R66Y 0:80df663dd15e 463 __O uint32_t I2CONCLR;
R66Y 0:80df663dd15e 464 __IO uint32_t MMCTRL;
R66Y 0:80df663dd15e 465 __IO uint32_t I2ADR1;
R66Y 0:80df663dd15e 466 __IO uint32_t I2ADR2;
R66Y 0:80df663dd15e 467 __IO uint32_t I2ADR3;
R66Y 0:80df663dd15e 468 __I uint32_t I2DATA_BUFFER;
R66Y 0:80df663dd15e 469 __IO uint32_t I2MASK0;
R66Y 0:80df663dd15e 470 __IO uint32_t I2MASK1;
R66Y 0:80df663dd15e 471 __IO uint32_t I2MASK2;
R66Y 0:80df663dd15e 472 __IO uint32_t I2MASK3;
R66Y 0:80df663dd15e 473 } LPC_I2C_TypeDef;
R66Y 0:80df663dd15e 474
R66Y 0:80df663dd15e 475 /*------------- Inter IC Sound (I2S) -----------------------------------------*/
R66Y 0:80df663dd15e 476 typedef struct
R66Y 0:80df663dd15e 477 {
R66Y 0:80df663dd15e 478 __IO uint32_t I2SDAO;
R66Y 0:80df663dd15e 479 __IO uint32_t I2SDAI;
R66Y 0:80df663dd15e 480 __O uint32_t I2STXFIFO;
R66Y 0:80df663dd15e 481 __I uint32_t I2SRXFIFO;
R66Y 0:80df663dd15e 482 __I uint32_t I2SSTATE;
R66Y 0:80df663dd15e 483 __IO uint32_t I2SDMA1;
R66Y 0:80df663dd15e 484 __IO uint32_t I2SDMA2;
R66Y 0:80df663dd15e 485 __IO uint32_t I2SIRQ;
R66Y 0:80df663dd15e 486 __IO uint32_t I2STXRATE;
R66Y 0:80df663dd15e 487 __IO uint32_t I2SRXRATE;
R66Y 0:80df663dd15e 488 __IO uint32_t I2STXBITRATE;
R66Y 0:80df663dd15e 489 __IO uint32_t I2SRXBITRATE;
R66Y 0:80df663dd15e 490 __IO uint32_t I2STXMODE;
R66Y 0:80df663dd15e 491 __IO uint32_t I2SRXMODE;
R66Y 0:80df663dd15e 492 } LPC_I2S_TypeDef;
R66Y 0:80df663dd15e 493
R66Y 0:80df663dd15e 494 /*------------- Repetitive Interrupt Timer (RIT) -----------------------------*/
R66Y 0:80df663dd15e 495 typedef struct
R66Y 0:80df663dd15e 496 {
R66Y 0:80df663dd15e 497 __IO uint32_t RICOMPVAL;
R66Y 0:80df663dd15e 498 __IO uint32_t RIMASK;
R66Y 0:80df663dd15e 499 __IO uint8_t RICTRL;
R66Y 0:80df663dd15e 500 uint8_t RESERVED0[3];
R66Y 0:80df663dd15e 501 __IO uint32_t RICOUNTER;
R66Y 0:80df663dd15e 502 } LPC_RIT_TypeDef;
R66Y 0:80df663dd15e 503
R66Y 0:80df663dd15e 504 /*------------- Real-Time Clock (RTC) ----------------------------------------*/
R66Y 0:80df663dd15e 505 typedef struct
R66Y 0:80df663dd15e 506 {
R66Y 0:80df663dd15e 507 __IO uint8_t ILR;
R66Y 0:80df663dd15e 508 uint8_t RESERVED0[7];
R66Y 0:80df663dd15e 509 __IO uint8_t CCR;
R66Y 0:80df663dd15e 510 uint8_t RESERVED1[3];
R66Y 0:80df663dd15e 511 __IO uint8_t CIIR;
R66Y 0:80df663dd15e 512 uint8_t RESERVED2[3];
R66Y 0:80df663dd15e 513 __IO uint8_t AMR;
R66Y 0:80df663dd15e 514 uint8_t RESERVED3[3];
R66Y 0:80df663dd15e 515 __I uint32_t CTIME0;
R66Y 0:80df663dd15e 516 __I uint32_t CTIME1;
R66Y 0:80df663dd15e 517 __I uint32_t CTIME2;
R66Y 0:80df663dd15e 518 __IO uint8_t SEC;
R66Y 0:80df663dd15e 519 uint8_t RESERVED4[3];
R66Y 0:80df663dd15e 520 __IO uint8_t MIN;
R66Y 0:80df663dd15e 521 uint8_t RESERVED5[3];
R66Y 0:80df663dd15e 522 __IO uint8_t HOUR;
R66Y 0:80df663dd15e 523 uint8_t RESERVED6[3];
R66Y 0:80df663dd15e 524 __IO uint8_t DOM;
R66Y 0:80df663dd15e 525 uint8_t RESERVED7[3];
R66Y 0:80df663dd15e 526 __IO uint8_t DOW;
R66Y 0:80df663dd15e 527 uint8_t RESERVED8[3];
R66Y 0:80df663dd15e 528 __IO uint16_t DOY;
R66Y 0:80df663dd15e 529 uint16_t RESERVED9;
R66Y 0:80df663dd15e 530 __IO uint8_t MONTH;
R66Y 0:80df663dd15e 531 uint8_t RESERVED10[3];
R66Y 0:80df663dd15e 532 __IO uint16_t YEAR;
R66Y 0:80df663dd15e 533 uint16_t RESERVED11;
R66Y 0:80df663dd15e 534 __IO uint32_t CALIBRATION;
R66Y 0:80df663dd15e 535 __IO uint32_t GPREG0;
R66Y 0:80df663dd15e 536 __IO uint32_t GPREG1;
R66Y 0:80df663dd15e 537 __IO uint32_t GPREG2;
R66Y 0:80df663dd15e 538 __IO uint32_t GPREG3;
R66Y 0:80df663dd15e 539 __IO uint32_t GPREG4;
R66Y 0:80df663dd15e 540 __IO uint8_t RTC_AUXEN;
R66Y 0:80df663dd15e 541 uint8_t RESERVED12[3];
R66Y 0:80df663dd15e 542 __IO uint8_t RTC_AUX;
R66Y 0:80df663dd15e 543 uint8_t RESERVED13[3];
R66Y 0:80df663dd15e 544 __IO uint8_t ALSEC;
R66Y 0:80df663dd15e 545 uint8_t RESERVED14[3];
R66Y 0:80df663dd15e 546 __IO uint8_t ALMIN;
R66Y 0:80df663dd15e 547 uint8_t RESERVED15[3];
R66Y 0:80df663dd15e 548 __IO uint8_t ALHOUR;
R66Y 0:80df663dd15e 549 uint8_t RESERVED16[3];
R66Y 0:80df663dd15e 550 __IO uint8_t ALDOM;
R66Y 0:80df663dd15e 551 uint8_t RESERVED17[3];
R66Y 0:80df663dd15e 552 __IO uint8_t ALDOW;
R66Y 0:80df663dd15e 553 uint8_t RESERVED18[3];
R66Y 0:80df663dd15e 554 __IO uint16_t ALDOY;
R66Y 0:80df663dd15e 555 uint16_t RESERVED19;
R66Y 0:80df663dd15e 556 __IO uint8_t ALMON;
R66Y 0:80df663dd15e 557 uint8_t RESERVED20[3];
R66Y 0:80df663dd15e 558 __IO uint16_t ALYEAR;
R66Y 0:80df663dd15e 559 uint16_t RESERVED21;
R66Y 0:80df663dd15e 560 } LPC_RTC_TypeDef;
R66Y 0:80df663dd15e 561
R66Y 0:80df663dd15e 562 /*------------- Watchdog Timer (WDT) -----------------------------------------*/
R66Y 0:80df663dd15e 563 typedef struct
R66Y 0:80df663dd15e 564 {
R66Y 0:80df663dd15e 565 __IO uint8_t WDMOD;
R66Y 0:80df663dd15e 566 uint8_t RESERVED0[3];
R66Y 0:80df663dd15e 567 __IO uint32_t WDTC;
R66Y 0:80df663dd15e 568 __O uint8_t WDFEED;
R66Y 0:80df663dd15e 569 uint8_t RESERVED1[3];
R66Y 0:80df663dd15e 570 __I uint32_t WDTV;
R66Y 0:80df663dd15e 571 __IO uint32_t WDCLKSEL;
R66Y 0:80df663dd15e 572 } LPC_WDT_TypeDef;
R66Y 0:80df663dd15e 573
R66Y 0:80df663dd15e 574 /*------------- Analog-to-Digital Converter (ADC) ----------------------------*/
R66Y 0:80df663dd15e 575 typedef struct
R66Y 0:80df663dd15e 576 {
R66Y 0:80df663dd15e 577 __IO uint32_t ADCR;
R66Y 0:80df663dd15e 578 __IO uint32_t ADGDR;
R66Y 0:80df663dd15e 579 uint32_t RESERVED0;
R66Y 0:80df663dd15e 580 __IO uint32_t ADINTEN;
R66Y 0:80df663dd15e 581 __I uint32_t ADDR0;
R66Y 0:80df663dd15e 582 __I uint32_t ADDR1;
R66Y 0:80df663dd15e 583 __I uint32_t ADDR2;
R66Y 0:80df663dd15e 584 __I uint32_t ADDR3;
R66Y 0:80df663dd15e 585 __I uint32_t ADDR4;
R66Y 0:80df663dd15e 586 __I uint32_t ADDR5;
R66Y 0:80df663dd15e 587 __I uint32_t ADDR6;
R66Y 0:80df663dd15e 588 __I uint32_t ADDR7;
R66Y 0:80df663dd15e 589 __I uint32_t ADSTAT;
R66Y 0:80df663dd15e 590 __IO uint32_t ADTRM;
R66Y 0:80df663dd15e 591 } LPC_ADC_TypeDef;
R66Y 0:80df663dd15e 592
R66Y 0:80df663dd15e 593 /*------------- Digital-to-Analog Converter (DAC) ----------------------------*/
R66Y 0:80df663dd15e 594 typedef struct
R66Y 0:80df663dd15e 595 {
R66Y 0:80df663dd15e 596 __IO uint32_t DACR;
R66Y 0:80df663dd15e 597 __IO uint32_t DACCTRL;
R66Y 0:80df663dd15e 598 __IO uint16_t DACCNTVAL;
R66Y 0:80df663dd15e 599 } LPC_DAC_TypeDef;
R66Y 0:80df663dd15e 600
R66Y 0:80df663dd15e 601 /*------------- Motor Control Pulse-Width Modulation (MCPWM) -----------------*/
R66Y 0:80df663dd15e 602 typedef struct
R66Y 0:80df663dd15e 603 {
R66Y 0:80df663dd15e 604 __I uint32_t MCCON;
R66Y 0:80df663dd15e 605 __O uint32_t MCCON_SET;
R66Y 0:80df663dd15e 606 __O uint32_t MCCON_CLR;
R66Y 0:80df663dd15e 607 __I uint32_t MCCAPCON;
R66Y 0:80df663dd15e 608 __O uint32_t MCCAPCON_SET;
R66Y 0:80df663dd15e 609 __O uint32_t MCCAPCON_CLR;
R66Y 0:80df663dd15e 610 __IO uint32_t MCTIM0;
R66Y 0:80df663dd15e 611 __IO uint32_t MCTIM1;
R66Y 0:80df663dd15e 612 __IO uint32_t MCTIM2;
R66Y 0:80df663dd15e 613 __IO uint32_t MCPER0;
R66Y 0:80df663dd15e 614 __IO uint32_t MCPER1;
R66Y 0:80df663dd15e 615 __IO uint32_t MCPER2;
R66Y 0:80df663dd15e 616 __IO uint32_t MCPW0;
R66Y 0:80df663dd15e 617 __IO uint32_t MCPW1;
R66Y 0:80df663dd15e 618 __IO uint32_t MCPW2;
R66Y 0:80df663dd15e 619 __IO uint32_t MCDEADTIME;
R66Y 0:80df663dd15e 620 __IO uint32_t MCCCP;
R66Y 0:80df663dd15e 621 __IO uint32_t MCCR0;
R66Y 0:80df663dd15e 622 __IO uint32_t MCCR1;
R66Y 0:80df663dd15e 623 __IO uint32_t MCCR2;
R66Y 0:80df663dd15e 624 __I uint32_t MCINTEN;
R66Y 0:80df663dd15e 625 __O uint32_t MCINTEN_SET;
R66Y 0:80df663dd15e 626 __O uint32_t MCINTEN_CLR;
R66Y 0:80df663dd15e 627 __I uint32_t MCCNTCON;
R66Y 0:80df663dd15e 628 __O uint32_t MCCNTCON_SET;
R66Y 0:80df663dd15e 629 __O uint32_t MCCNTCON_CLR;
R66Y 0:80df663dd15e 630 __I uint32_t MCINTFLAG;
R66Y 0:80df663dd15e 631 __O uint32_t MCINTFLAG_SET;
R66Y 0:80df663dd15e 632 __O uint32_t MCINTFLAG_CLR;
R66Y 0:80df663dd15e 633 __O uint32_t MCCAP_CLR;
R66Y 0:80df663dd15e 634 } LPC_MCPWM_TypeDef;
R66Y 0:80df663dd15e 635
R66Y 0:80df663dd15e 636 /*------------- Quadrature Encoder Interface (QEI) ---------------------------*/
R66Y 0:80df663dd15e 637 typedef struct
R66Y 0:80df663dd15e 638 {
R66Y 0:80df663dd15e 639 __O uint32_t QEICON;
R66Y 0:80df663dd15e 640 __I uint32_t QEISTAT;
R66Y 0:80df663dd15e 641 __IO uint32_t QEICONF;
R66Y 0:80df663dd15e 642 __I uint32_t QEIPOS;
R66Y 0:80df663dd15e 643 __IO uint32_t QEIMAXPOS;
R66Y 0:80df663dd15e 644 __IO uint32_t CMPOS0;
R66Y 0:80df663dd15e 645 __IO uint32_t CMPOS1;
R66Y 0:80df663dd15e 646 __IO uint32_t CMPOS2;
R66Y 0:80df663dd15e 647 __I uint32_t INXCNT;
R66Y 0:80df663dd15e 648 __IO uint32_t INXCMP;
R66Y 0:80df663dd15e 649 __IO uint32_t QEILOAD;
R66Y 0:80df663dd15e 650 __I uint32_t QEITIME;
R66Y 0:80df663dd15e 651 __I uint32_t QEIVEL;
R66Y 0:80df663dd15e 652 __I uint32_t QEICAP;
R66Y 0:80df663dd15e 653 __IO uint32_t VELCOMP;
R66Y 0:80df663dd15e 654 __IO uint32_t FILTER;
R66Y 0:80df663dd15e 655 uint32_t RESERVED0[998];
R66Y 0:80df663dd15e 656 __O uint32_t QEIIEC;
R66Y 0:80df663dd15e 657 __O uint32_t QEIIES;
R66Y 0:80df663dd15e 658 __I uint32_t QEIINTSTAT;
R66Y 0:80df663dd15e 659 __I uint32_t QEIIE;
R66Y 0:80df663dd15e 660 __O uint32_t QEICLR;
R66Y 0:80df663dd15e 661 __O uint32_t QEISET;
R66Y 0:80df663dd15e 662 } LPC_QEI_TypeDef;
R66Y 0:80df663dd15e 663
R66Y 0:80df663dd15e 664 /*------------- Controller Area Network (CAN) --------------------------------*/
R66Y 0:80df663dd15e 665 typedef struct
R66Y 0:80df663dd15e 666 {
R66Y 0:80df663dd15e 667 __IO uint32_t mask[512]; /* ID Masks */
R66Y 0:80df663dd15e 668 } LPC_CANAF_RAM_TypeDef;
R66Y 0:80df663dd15e 669
R66Y 0:80df663dd15e 670 typedef struct /* Acceptance Filter Registers */
R66Y 0:80df663dd15e 671 {
R66Y 0:80df663dd15e 672 __IO uint32_t AFMR;
R66Y 0:80df663dd15e 673 __IO uint32_t SFF_sa;
R66Y 0:80df663dd15e 674 __IO uint32_t SFF_GRP_sa;
R66Y 0:80df663dd15e 675 __IO uint32_t EFF_sa;
R66Y 0:80df663dd15e 676 __IO uint32_t EFF_GRP_sa;
R66Y 0:80df663dd15e 677 __IO uint32_t ENDofTable;
R66Y 0:80df663dd15e 678 __I uint32_t LUTerrAd;
R66Y 0:80df663dd15e 679 __I uint32_t LUTerr;
R66Y 0:80df663dd15e 680 __IO uint32_t FCANIE;
R66Y 0:80df663dd15e 681 __IO uint32_t FCANIC0;
R66Y 0:80df663dd15e 682 __IO uint32_t FCANIC1;
R66Y 0:80df663dd15e 683 } LPC_CANAF_TypeDef;
R66Y 0:80df663dd15e 684
R66Y 0:80df663dd15e 685 typedef struct /* Central Registers */
R66Y 0:80df663dd15e 686 {
R66Y 0:80df663dd15e 687 __I uint32_t CANTxSR;
R66Y 0:80df663dd15e 688 __I uint32_t CANRxSR;
R66Y 0:80df663dd15e 689 __I uint32_t CANMSR;
R66Y 0:80df663dd15e 690 } LPC_CANCR_TypeDef;
R66Y 0:80df663dd15e 691
R66Y 0:80df663dd15e 692 typedef struct /* Controller Registers */
R66Y 0:80df663dd15e 693 {
R66Y 0:80df663dd15e 694 __IO uint32_t MOD;
R66Y 0:80df663dd15e 695 __O uint32_t CMR;
R66Y 0:80df663dd15e 696 __IO uint32_t GSR;
R66Y 0:80df663dd15e 697 __I uint32_t ICR;
R66Y 0:80df663dd15e 698 __IO uint32_t IER;
R66Y 0:80df663dd15e 699 __IO uint32_t BTR;
R66Y 0:80df663dd15e 700 __IO uint32_t EWL;
R66Y 0:80df663dd15e 701 __I uint32_t SR;
R66Y 0:80df663dd15e 702 __IO uint32_t RFS;
R66Y 0:80df663dd15e 703 __IO uint32_t RID;
R66Y 0:80df663dd15e 704 __IO uint32_t RDA;
R66Y 0:80df663dd15e 705 __IO uint32_t RDB;
R66Y 0:80df663dd15e 706 __IO uint32_t TFI1;
R66Y 0:80df663dd15e 707 __IO uint32_t TID1;
R66Y 0:80df663dd15e 708 __IO uint32_t TDA1;
R66Y 0:80df663dd15e 709 __IO uint32_t TDB1;
R66Y 0:80df663dd15e 710 __IO uint32_t TFI2;
R66Y 0:80df663dd15e 711 __IO uint32_t TID2;
R66Y 0:80df663dd15e 712 __IO uint32_t TDA2;
R66Y 0:80df663dd15e 713 __IO uint32_t TDB2;
R66Y 0:80df663dd15e 714 __IO uint32_t TFI3;
R66Y 0:80df663dd15e 715 __IO uint32_t TID3;
R66Y 0:80df663dd15e 716 __IO uint32_t TDA3;
R66Y 0:80df663dd15e 717 __IO uint32_t TDB3;
R66Y 0:80df663dd15e 718 } LPC_CAN_TypeDef;
R66Y 0:80df663dd15e 719
R66Y 0:80df663dd15e 720 /*------------- General Purpose Direct Memory Access (GPDMA) -----------------*/
R66Y 0:80df663dd15e 721 typedef struct /* Common Registers */
R66Y 0:80df663dd15e 722 {
R66Y 0:80df663dd15e 723 __I uint32_t DMACIntStat;
R66Y 0:80df663dd15e 724 __I uint32_t DMACIntTCStat;
R66Y 0:80df663dd15e 725 __O uint32_t DMACIntTCClear;
R66Y 0:80df663dd15e 726 __I uint32_t DMACIntErrStat;
R66Y 0:80df663dd15e 727 __O uint32_t DMACIntErrClr;
R66Y 0:80df663dd15e 728 __I uint32_t DMACRawIntTCStat;
R66Y 0:80df663dd15e 729 __I uint32_t DMACRawIntErrStat;
R66Y 0:80df663dd15e 730 __I uint32_t DMACEnbldChns;
R66Y 0:80df663dd15e 731 __IO uint32_t DMACSoftBReq;
R66Y 0:80df663dd15e 732 __IO uint32_t DMACSoftSReq;
R66Y 0:80df663dd15e 733 __IO uint32_t DMACSoftLBReq;
R66Y 0:80df663dd15e 734 __IO uint32_t DMACSoftLSReq;
R66Y 0:80df663dd15e 735 __IO uint32_t DMACConfig;
R66Y 0:80df663dd15e 736 __IO uint32_t DMACSync;
R66Y 0:80df663dd15e 737 } LPC_GPDMA_TypeDef;
R66Y 0:80df663dd15e 738
R66Y 0:80df663dd15e 739 typedef struct /* Channel Registers */
R66Y 0:80df663dd15e 740 {
R66Y 0:80df663dd15e 741 __IO uint32_t DMACCSrcAddr;
R66Y 0:80df663dd15e 742 __IO uint32_t DMACCDestAddr;
R66Y 0:80df663dd15e 743 __IO uint32_t DMACCLLI;
R66Y 0:80df663dd15e 744 __IO uint32_t DMACCControl;
R66Y 0:80df663dd15e 745 __IO uint32_t DMACCConfig;
R66Y 0:80df663dd15e 746 } LPC_GPDMACH_TypeDef;
R66Y 0:80df663dd15e 747
R66Y 0:80df663dd15e 748 /*------------- Universal Serial Bus (USB) -----------------------------------*/
R66Y 0:80df663dd15e 749 typedef struct
R66Y 0:80df663dd15e 750 {
R66Y 0:80df663dd15e 751 __I uint32_t HcRevision; /* USB Host Registers */
R66Y 0:80df663dd15e 752 __IO uint32_t HcControl;
R66Y 0:80df663dd15e 753 __IO uint32_t HcCommandStatus;
R66Y 0:80df663dd15e 754 __IO uint32_t HcInterruptStatus;
R66Y 0:80df663dd15e 755 __IO uint32_t HcInterruptEnable;
R66Y 0:80df663dd15e 756 __IO uint32_t HcInterruptDisable;
R66Y 0:80df663dd15e 757 __IO uint32_t HcHCCA;
R66Y 0:80df663dd15e 758 __I uint32_t HcPeriodCurrentED;
R66Y 0:80df663dd15e 759 __IO uint32_t HcControlHeadED;
R66Y 0:80df663dd15e 760 __IO uint32_t HcControlCurrentED;
R66Y 0:80df663dd15e 761 __IO uint32_t HcBulkHeadED;
R66Y 0:80df663dd15e 762 __IO uint32_t HcBulkCurrentED;
R66Y 0:80df663dd15e 763 __I uint32_t HcDoneHead;
R66Y 0:80df663dd15e 764 __IO uint32_t HcFmInterval;
R66Y 0:80df663dd15e 765 __I uint32_t HcFmRemaining;
R66Y 0:80df663dd15e 766 __I uint32_t HcFmNumber;
R66Y 0:80df663dd15e 767 __IO uint32_t HcPeriodicStart;
R66Y 0:80df663dd15e 768 __IO uint32_t HcLSTreshold;
R66Y 0:80df663dd15e 769 __IO uint32_t HcRhDescriptorA;
R66Y 0:80df663dd15e 770 __IO uint32_t HcRhDescriptorB;
R66Y 0:80df663dd15e 771 __IO uint32_t HcRhStatus;
R66Y 0:80df663dd15e 772 __IO uint32_t HcRhPortStatus1;
R66Y 0:80df663dd15e 773 __IO uint32_t HcRhPortStatus2;
R66Y 0:80df663dd15e 774 uint32_t RESERVED0[40];
R66Y 0:80df663dd15e 775 __I uint32_t Module_ID;
R66Y 0:80df663dd15e 776
R66Y 0:80df663dd15e 777 __I uint32_t OTGIntSt; /* USB On-The-Go Registers */
R66Y 0:80df663dd15e 778 __IO uint32_t OTGIntEn;
R66Y 0:80df663dd15e 779 __O uint32_t OTGIntSet;
R66Y 0:80df663dd15e 780 __O uint32_t OTGIntClr;
R66Y 0:80df663dd15e 781 __IO uint32_t OTGStCtrl;
R66Y 0:80df663dd15e 782 __IO uint32_t OTGTmr;
R66Y 0:80df663dd15e 783 uint32_t RESERVED1[58];
R66Y 0:80df663dd15e 784
R66Y 0:80df663dd15e 785 __I uint32_t USBDevIntSt; /* USB Device Interrupt Registers */
R66Y 0:80df663dd15e 786 __IO uint32_t USBDevIntEn;
R66Y 0:80df663dd15e 787 __O uint32_t USBDevIntClr;
R66Y 0:80df663dd15e 788 __O uint32_t USBDevIntSet;
R66Y 0:80df663dd15e 789
R66Y 0:80df663dd15e 790 __O uint32_t USBCmdCode; /* USB Device SIE Command Registers */
R66Y 0:80df663dd15e 791 __I uint32_t USBCmdData;
R66Y 0:80df663dd15e 792
R66Y 0:80df663dd15e 793 __I uint32_t USBRxData; /* USB Device Transfer Registers */
R66Y 0:80df663dd15e 794 __O uint32_t USBTxData;
R66Y 0:80df663dd15e 795 __I uint32_t USBRxPLen;
R66Y 0:80df663dd15e 796 __O uint32_t USBTxPLen;
R66Y 0:80df663dd15e 797 __IO uint32_t USBCtrl;
R66Y 0:80df663dd15e 798 __O uint32_t USBDevIntPri;
R66Y 0:80df663dd15e 799
R66Y 0:80df663dd15e 800 __I uint32_t USBEpIntSt; /* USB Device Endpoint Interrupt Regs */
R66Y 0:80df663dd15e 801 __IO uint32_t USBEpIntEn;
R66Y 0:80df663dd15e 802 __O uint32_t USBEpIntClr;
R66Y 0:80df663dd15e 803 __O uint32_t USBEpIntSet;
R66Y 0:80df663dd15e 804 __O uint32_t USBEpIntPri;
R66Y 0:80df663dd15e 805
R66Y 0:80df663dd15e 806 __IO uint32_t USBReEp; /* USB Device Endpoint Realization Reg*/
R66Y 0:80df663dd15e 807 __O uint32_t USBEpInd;
R66Y 0:80df663dd15e 808 __IO uint32_t USBMaxPSize;
R66Y 0:80df663dd15e 809
R66Y 0:80df663dd15e 810 __I uint32_t USBDMARSt; /* USB Device DMA Registers */
R66Y 0:80df663dd15e 811 __O uint32_t USBDMARClr;
R66Y 0:80df663dd15e 812 __O uint32_t USBDMARSet;
R66Y 0:80df663dd15e 813 uint32_t RESERVED2[9];
R66Y 0:80df663dd15e 814 __IO uint32_t USBUDCAH;
R66Y 0:80df663dd15e 815 __I uint32_t USBEpDMASt;
R66Y 0:80df663dd15e 816 __O uint32_t USBEpDMAEn;
R66Y 0:80df663dd15e 817 __O uint32_t USBEpDMADis;
R66Y 0:80df663dd15e 818 __I uint32_t USBDMAIntSt;
R66Y 0:80df663dd15e 819 __IO uint32_t USBDMAIntEn;
R66Y 0:80df663dd15e 820 uint32_t RESERVED3[2];
R66Y 0:80df663dd15e 821 __I uint32_t USBEoTIntSt;
R66Y 0:80df663dd15e 822 __O uint32_t USBEoTIntClr;
R66Y 0:80df663dd15e 823 __O uint32_t USBEoTIntSet;
R66Y 0:80df663dd15e 824 __I uint32_t USBNDDRIntSt;
R66Y 0:80df663dd15e 825 __O uint32_t USBNDDRIntClr;
R66Y 0:80df663dd15e 826 __O uint32_t USBNDDRIntSet;
R66Y 0:80df663dd15e 827 __I uint32_t USBSysErrIntSt;
R66Y 0:80df663dd15e 828 __O uint32_t USBSysErrIntClr;
R66Y 0:80df663dd15e 829 __O uint32_t USBSysErrIntSet;
R66Y 0:80df663dd15e 830 uint32_t RESERVED4[15];
R66Y 0:80df663dd15e 831
R66Y 0:80df663dd15e 832 union {
R66Y 0:80df663dd15e 833 __I uint32_t I2C_RX; /* USB OTG I2C Registers */
R66Y 0:80df663dd15e 834 __O uint32_t I2C_TX;
R66Y 0:80df663dd15e 835 };
R66Y 0:80df663dd15e 836 __I uint32_t I2C_STS;
R66Y 0:80df663dd15e 837 __IO uint32_t I2C_CTL;
R66Y 0:80df663dd15e 838 __IO uint32_t I2C_CLKHI;
R66Y 0:80df663dd15e 839 __O uint32_t I2C_CLKLO;
R66Y 0:80df663dd15e 840 uint32_t RESERVED5[824];
R66Y 0:80df663dd15e 841
R66Y 0:80df663dd15e 842 union {
R66Y 0:80df663dd15e 843 __IO uint32_t USBClkCtrl; /* USB Clock Control Registers */
R66Y 0:80df663dd15e 844 __IO uint32_t OTGClkCtrl;
R66Y 0:80df663dd15e 845 };
R66Y 0:80df663dd15e 846 union {
R66Y 0:80df663dd15e 847 __I uint32_t USBClkSt;
R66Y 0:80df663dd15e 848 __I uint32_t OTGClkSt;
R66Y 0:80df663dd15e 849 };
R66Y 0:80df663dd15e 850 } LPC_USB_TypeDef;
R66Y 0:80df663dd15e 851
R66Y 0:80df663dd15e 852 /*------------- Ethernet Media Access Controller (EMAC) ----------------------*/
R66Y 0:80df663dd15e 853 typedef struct
R66Y 0:80df663dd15e 854 {
R66Y 0:80df663dd15e 855 __IO uint32_t MAC1; /* MAC Registers */
R66Y 0:80df663dd15e 856 __IO uint32_t MAC2;
R66Y 0:80df663dd15e 857 __IO uint32_t IPGT;
R66Y 0:80df663dd15e 858 __IO uint32_t IPGR;
R66Y 0:80df663dd15e 859 __IO uint32_t CLRT;
R66Y 0:80df663dd15e 860 __IO uint32_t MAXF;
R66Y 0:80df663dd15e 861 __IO uint32_t SUPP;
R66Y 0:80df663dd15e 862 __IO uint32_t TEST;
R66Y 0:80df663dd15e 863 __IO uint32_t MCFG;
R66Y 0:80df663dd15e 864 __IO uint32_t MCMD;
R66Y 0:80df663dd15e 865 __IO uint32_t MADR;
R66Y 0:80df663dd15e 866 __O uint32_t MWTD;
R66Y 0:80df663dd15e 867 __I uint32_t MRDD;
R66Y 0:80df663dd15e 868 __I uint32_t MIND;
R66Y 0:80df663dd15e 869 uint32_t RESERVED0[2];
R66Y 0:80df663dd15e 870 __IO uint32_t SA0;
R66Y 0:80df663dd15e 871 __IO uint32_t SA1;
R66Y 0:80df663dd15e 872 __IO uint32_t SA2;
R66Y 0:80df663dd15e 873 uint32_t RESERVED1[45];
R66Y 0:80df663dd15e 874 __IO uint32_t Command; /* Control Registers */
R66Y 0:80df663dd15e 875 __I uint32_t Status;
R66Y 0:80df663dd15e 876 __IO uint32_t RxDescriptor;
R66Y 0:80df663dd15e 877 __IO uint32_t RxStatus;
R66Y 0:80df663dd15e 878 __IO uint32_t RxDescriptorNumber;
R66Y 0:80df663dd15e 879 __I uint32_t RxProduceIndex;
R66Y 0:80df663dd15e 880 __IO uint32_t RxConsumeIndex;
R66Y 0:80df663dd15e 881 __IO uint32_t TxDescriptor;
R66Y 0:80df663dd15e 882 __IO uint32_t TxStatus;
R66Y 0:80df663dd15e 883 __IO uint32_t TxDescriptorNumber;
R66Y 0:80df663dd15e 884 __IO uint32_t TxProduceIndex;
R66Y 0:80df663dd15e 885 __I uint32_t TxConsumeIndex;
R66Y 0:80df663dd15e 886 uint32_t RESERVED2[10];
R66Y 0:80df663dd15e 887 __I uint32_t TSV0;
R66Y 0:80df663dd15e 888 __I uint32_t TSV1;
R66Y 0:80df663dd15e 889 __I uint32_t RSV;
R66Y 0:80df663dd15e 890 uint32_t RESERVED3[3];
R66Y 0:80df663dd15e 891 __IO uint32_t FlowControlCounter;
R66Y 0:80df663dd15e 892 __I uint32_t FlowControlStatus;
R66Y 0:80df663dd15e 893 uint32_t RESERVED4[34];
R66Y 0:80df663dd15e 894 __IO uint32_t RxFilterCtrl; /* Rx Filter Registers */
R66Y 0:80df663dd15e 895 __IO uint32_t RxFilterWoLStatus;
R66Y 0:80df663dd15e 896 __IO uint32_t RxFilterWoLClear;
R66Y 0:80df663dd15e 897 uint32_t RESERVED5;
R66Y 0:80df663dd15e 898 __IO uint32_t HashFilterL;
R66Y 0:80df663dd15e 899 __IO uint32_t HashFilterH;
R66Y 0:80df663dd15e 900 uint32_t RESERVED6[882];
R66Y 0:80df663dd15e 901 __I uint32_t IntStatus; /* Module Control Registers */
R66Y 0:80df663dd15e 902 __IO uint32_t IntEnable;
R66Y 0:80df663dd15e 903 __O uint32_t IntClear;
R66Y 0:80df663dd15e 904 __O uint32_t IntSet;
R66Y 0:80df663dd15e 905 uint32_t RESERVED7;
R66Y 0:80df663dd15e 906 __IO uint32_t PowerDown;
R66Y 0:80df663dd15e 907 uint32_t RESERVED8;
R66Y 0:80df663dd15e 908 __IO uint32_t Module_ID;
R66Y 0:80df663dd15e 909 } LPC_EMAC_TypeDef;
R66Y 0:80df663dd15e 910
R66Y 0:80df663dd15e 911 #if defined ( __CC_ARM )
R66Y 0:80df663dd15e 912 #pragma no_anon_unions
R66Y 0:80df663dd15e 913 #endif
R66Y 0:80df663dd15e 914
R66Y 0:80df663dd15e 915
R66Y 0:80df663dd15e 916 /******************************************************************************/
R66Y 0:80df663dd15e 917 /* Peripheral memory map */
R66Y 0:80df663dd15e 918 /******************************************************************************/
R66Y 0:80df663dd15e 919 /* Base addresses */
R66Y 0:80df663dd15e 920 #define LPC_FLASH_BASE (0x00000000UL)
R66Y 0:80df663dd15e 921 #define LPC_RAM_BASE (0x10000000UL)
R66Y 0:80df663dd15e 922 #define LPC_GPIO_BASE (0x2009C000UL)
R66Y 0:80df663dd15e 923 #define LPC_APB0_BASE (0x40000000UL)
R66Y 0:80df663dd15e 924 #define LPC_APB1_BASE (0x40080000UL)
R66Y 0:80df663dd15e 925 #define LPC_AHB_BASE (0x50000000UL)
R66Y 0:80df663dd15e 926 #define LPC_CM3_BASE (0xE0000000UL)
R66Y 0:80df663dd15e 927
R66Y 0:80df663dd15e 928 /* APB0 peripherals */
R66Y 0:80df663dd15e 929 #define LPC_WDT_BASE (LPC_APB0_BASE + 0x00000)
R66Y 0:80df663dd15e 930 #define LPC_TIM0_BASE (LPC_APB0_BASE + 0x04000)
R66Y 0:80df663dd15e 931 #define LPC_TIM1_BASE (LPC_APB0_BASE + 0x08000)
R66Y 0:80df663dd15e 932 #define LPC_UART0_BASE (LPC_APB0_BASE + 0x0C000)
R66Y 0:80df663dd15e 933 #define LPC_UART1_BASE (LPC_APB0_BASE + 0x10000)
R66Y 0:80df663dd15e 934 #define LPC_PWM1_BASE (LPC_APB0_BASE + 0x18000)
R66Y 0:80df663dd15e 935 #define LPC_I2C0_BASE (LPC_APB0_BASE + 0x1C000)
R66Y 0:80df663dd15e 936 #define LPC_SPI_BASE (LPC_APB0_BASE + 0x20000)
R66Y 0:80df663dd15e 937 #define LPC_RTC_BASE (LPC_APB0_BASE + 0x24000)
R66Y 0:80df663dd15e 938 #define LPC_GPIOINT_BASE (LPC_APB0_BASE + 0x28080)
R66Y 0:80df663dd15e 939 #define LPC_PINCON_BASE (LPC_APB0_BASE + 0x2C000)
R66Y 0:80df663dd15e 940 #define LPC_SSP1_BASE (LPC_APB0_BASE + 0x30000)
R66Y 0:80df663dd15e 941 #define LPC_ADC_BASE (LPC_APB0_BASE + 0x34000)
R66Y 0:80df663dd15e 942 #define LPC_CANAF_RAM_BASE (LPC_APB0_BASE + 0x38000)
R66Y 0:80df663dd15e 943 #define LPC_CANAF_BASE (LPC_APB0_BASE + 0x3C000)
R66Y 0:80df663dd15e 944 #define LPC_CANCR_BASE (LPC_APB0_BASE + 0x40000)
R66Y 0:80df663dd15e 945 #define LPC_CAN1_BASE (LPC_APB0_BASE + 0x44000)
R66Y 0:80df663dd15e 946 #define LPC_CAN2_BASE (LPC_APB0_BASE + 0x48000)
R66Y 0:80df663dd15e 947 #define LPC_I2C1_BASE (LPC_APB0_BASE + 0x5C000)
R66Y 0:80df663dd15e 948
R66Y 0:80df663dd15e 949 /* APB1 peripherals */
R66Y 0:80df663dd15e 950 #define LPC_SSP0_BASE (LPC_APB1_BASE + 0x08000)
R66Y 0:80df663dd15e 951 #define LPC_DAC_BASE (LPC_APB1_BASE + 0x0C000)
R66Y 0:80df663dd15e 952 #define LPC_TIM2_BASE (LPC_APB1_BASE + 0x10000)
R66Y 0:80df663dd15e 953 #define LPC_TIM3_BASE (LPC_APB1_BASE + 0x14000)
R66Y 0:80df663dd15e 954 #define LPC_UART2_BASE (LPC_APB1_BASE + 0x18000)
R66Y 0:80df663dd15e 955 #define LPC_UART3_BASE (LPC_APB1_BASE + 0x1C000)
R66Y 0:80df663dd15e 956 #define LPC_I2C2_BASE (LPC_APB1_BASE + 0x20000)
R66Y 0:80df663dd15e 957 #define LPC_I2S_BASE (LPC_APB1_BASE + 0x28000)
R66Y 0:80df663dd15e 958 #define LPC_RIT_BASE (LPC_APB1_BASE + 0x30000)
R66Y 0:80df663dd15e 959 #define LPC_MCPWM_BASE (LPC_APB1_BASE + 0x38000)
R66Y 0:80df663dd15e 960 #define LPC_QEI_BASE (LPC_APB1_BASE + 0x3C000)
R66Y 0:80df663dd15e 961 #define LPC_SC_BASE (LPC_APB1_BASE + 0x7C000)
R66Y 0:80df663dd15e 962
R66Y 0:80df663dd15e 963 /* AHB peripherals */
R66Y 0:80df663dd15e 964 #define LPC_EMAC_BASE (LPC_AHB_BASE + 0x00000)
R66Y 0:80df663dd15e 965 #define LPC_GPDMA_BASE (LPC_AHB_BASE + 0x04000)
R66Y 0:80df663dd15e 966 #define LPC_GPDMACH0_BASE (LPC_AHB_BASE + 0x04100)
R66Y 0:80df663dd15e 967 #define LPC_GPDMACH1_BASE (LPC_AHB_BASE + 0x04120)
R66Y 0:80df663dd15e 968 #define LPC_GPDMACH2_BASE (LPC_AHB_BASE + 0x04140)
R66Y 0:80df663dd15e 969 #define LPC_GPDMACH3_BASE (LPC_AHB_BASE + 0x04160)
R66Y 0:80df663dd15e 970 #define LPC_GPDMACH4_BASE (LPC_AHB_BASE + 0x04180)
R66Y 0:80df663dd15e 971 #define LPC_GPDMACH5_BASE (LPC_AHB_BASE + 0x041A0)
R66Y 0:80df663dd15e 972 #define LPC_GPDMACH6_BASE (LPC_AHB_BASE + 0x041C0)
R66Y 0:80df663dd15e 973 #define LPC_GPDMACH7_BASE (LPC_AHB_BASE + 0x041E0)
R66Y 0:80df663dd15e 974 #define LPC_USB_BASE (LPC_AHB_BASE + 0x0C000)
R66Y 0:80df663dd15e 975
R66Y 0:80df663dd15e 976 /* GPIOs */
R66Y 0:80df663dd15e 977 #define LPC_GPIO0_BASE (LPC_GPIO_BASE + 0x00000)
R66Y 0:80df663dd15e 978 #define LPC_GPIO1_BASE (LPC_GPIO_BASE + 0x00020)
R66Y 0:80df663dd15e 979 #define LPC_GPIO2_BASE (LPC_GPIO_BASE + 0x00040)
R66Y 0:80df663dd15e 980 #define LPC_GPIO3_BASE (LPC_GPIO_BASE + 0x00060)
R66Y 0:80df663dd15e 981 #define LPC_GPIO4_BASE (LPC_GPIO_BASE + 0x00080)
R66Y 0:80df663dd15e 982
R66Y 0:80df663dd15e 983
R66Y 0:80df663dd15e 984 /******************************************************************************/
R66Y 0:80df663dd15e 985 /* Peripheral declaration */
R66Y 0:80df663dd15e 986 /******************************************************************************/
R66Y 0:80df663dd15e 987 #define LPC_SC ((LPC_SC_TypeDef *) LPC_SC_BASE )
R66Y 0:80df663dd15e 988 #define LPC_GPIO0 ((LPC_GPIO_TypeDef *) LPC_GPIO0_BASE )
R66Y 0:80df663dd15e 989 #define LPC_GPIO1 ((LPC_GPIO_TypeDef *) LPC_GPIO1_BASE )
R66Y 0:80df663dd15e 990 #define LPC_GPIO2 ((LPC_GPIO_TypeDef *) LPC_GPIO2_BASE )
R66Y 0:80df663dd15e 991 #define LPC_GPIO3 ((LPC_GPIO_TypeDef *) LPC_GPIO3_BASE )
R66Y 0:80df663dd15e 992 #define LPC_GPIO4 ((LPC_GPIO_TypeDef *) LPC_GPIO4_BASE )
R66Y 0:80df663dd15e 993 #define LPC_WDT ((LPC_WDT_TypeDef *) LPC_WDT_BASE )
R66Y 0:80df663dd15e 994 #define LPC_TIM0 ((LPC_TIM_TypeDef *) LPC_TIM0_BASE )
R66Y 0:80df663dd15e 995 #define LPC_TIM1 ((LPC_TIM_TypeDef *) LPC_TIM1_BASE )
R66Y 0:80df663dd15e 996 #define LPC_TIM2 ((LPC_TIM_TypeDef *) LPC_TIM2_BASE )
R66Y 0:80df663dd15e 997 #define LPC_TIM3 ((LPC_TIM_TypeDef *) LPC_TIM3_BASE )
R66Y 0:80df663dd15e 998 #define LPC_RIT ((LPC_RIT_TypeDef *) LPC_RIT_BASE )
R66Y 0:80df663dd15e 999 #define LPC_UART0 ((LPC_UART0_TypeDef *) LPC_UART0_BASE )
R66Y 0:80df663dd15e 1000 #define LPC_UART1 ((LPC_UART1_TypeDef *) LPC_UART1_BASE )
R66Y 0:80df663dd15e 1001 #define LPC_UART2 ((LPC_UART_TypeDef *) LPC_UART2_BASE )
R66Y 0:80df663dd15e 1002 #define LPC_UART3 ((LPC_UART_TypeDef *) LPC_UART3_BASE )
R66Y 0:80df663dd15e 1003 #define LPC_PWM1 ((LPC_PWM_TypeDef *) LPC_PWM1_BASE )
R66Y 0:80df663dd15e 1004 #define LPC_I2C0 ((LPC_I2C_TypeDef *) LPC_I2C0_BASE )
R66Y 0:80df663dd15e 1005 #define LPC_I2C1 ((LPC_I2C_TypeDef *) LPC_I2C1_BASE )
R66Y 0:80df663dd15e 1006 #define LPC_I2C2 ((LPC_I2C_TypeDef *) LPC_I2C2_BASE )
R66Y 0:80df663dd15e 1007 #define LPC_I2S ((LPC_I2S_TypeDef *) LPC_I2S_BASE )
R66Y 0:80df663dd15e 1008 #define LPC_SPI ((LPC_SPI_TypeDef *) LPC_SPI_BASE )
R66Y 0:80df663dd15e 1009 #define LPC_RTC ((LPC_RTC_TypeDef *) LPC_RTC_BASE )
R66Y 0:80df663dd15e 1010 #define LPC_GPIOINT ((LPC_GPIOINT_TypeDef *) LPC_GPIOINT_BASE )
R66Y 0:80df663dd15e 1011 #define LPC_PINCON ((LPC_PINCON_TypeDef *) LPC_PINCON_BASE )
R66Y 0:80df663dd15e 1012 #define LPC_SSP0 ((LPC_SSP_TypeDef *) LPC_SSP0_BASE )
R66Y 0:80df663dd15e 1013 #define LPC_SSP1 ((LPC_SSP_TypeDef *) LPC_SSP1_BASE )
R66Y 0:80df663dd15e 1014 #define LPC_ADC ((LPC_ADC_TypeDef *) LPC_ADC_BASE )
R66Y 0:80df663dd15e 1015 #define LPC_DAC ((LPC_DAC_TypeDef *) LPC_DAC_BASE )
R66Y 0:80df663dd15e 1016 #define LPC_CANAF_RAM ((LPC_CANAF_RAM_TypeDef *) LPC_CANAF_RAM_BASE)
R66Y 0:80df663dd15e 1017 #define LPC_CANAF ((LPC_CANAF_TypeDef *) LPC_CANAF_BASE )
R66Y 0:80df663dd15e 1018 #define LPC_CANCR ((LPC_CANCR_TypeDef *) LPC_CANCR_BASE )
R66Y 0:80df663dd15e 1019 #define LPC_CAN1 ((LPC_CAN_TypeDef *) LPC_CAN1_BASE )
R66Y 0:80df663dd15e 1020 #define LPC_CAN2 ((LPC_CAN_TypeDef *) LPC_CAN2_BASE )
R66Y 0:80df663dd15e 1021 #define LPC_MCPWM ((LPC_MCPWM_TypeDef *) LPC_MCPWM_BASE )
R66Y 0:80df663dd15e 1022 #define LPC_QEI ((LPC_QEI_TypeDef *) LPC_QEI_BASE )
R66Y 0:80df663dd15e 1023 #define LPC_EMAC ((LPC_EMAC_TypeDef *) LPC_EMAC_BASE )
R66Y 0:80df663dd15e 1024 #define LPC_GPDMA ((LPC_GPDMA_TypeDef *) LPC_GPDMA_BASE )
R66Y 0:80df663dd15e 1025 #define LPC_GPDMACH0 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH0_BASE )
R66Y 0:80df663dd15e 1026 #define LPC_GPDMACH1 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH1_BASE )
R66Y 0:80df663dd15e 1027 #define LPC_GPDMACH2 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH2_BASE )
R66Y 0:80df663dd15e 1028 #define LPC_GPDMACH3 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH3_BASE )
R66Y 0:80df663dd15e 1029 #define LPC_GPDMACH4 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH4_BASE )
R66Y 0:80df663dd15e 1030 #define LPC_GPDMACH5 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH5_BASE )
R66Y 0:80df663dd15e 1031 #define LPC_GPDMACH6 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH6_BASE )
R66Y 0:80df663dd15e 1032 #define LPC_GPDMACH7 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH7_BASE )
R66Y 0:80df663dd15e 1033 #define LPC_USB ((LPC_USB_TypeDef *) LPC_USB_BASE )
R66Y 0:80df663dd15e 1034
R66Y 0:80df663dd15e 1035 #endif // __LPC17xx_H__