Wiljan Arias / WhexReefMonitor

Dependencies:   mbed-rtos EthernetInterface FatFileSystemCpp MCP23S17 SDFileSystem mbed

Fork of HTTPServerHelloWorld by Donatien Garnier

Committer:
wyunreal
Date:
Fri Jan 31 23:19:28 2014 +0000
Revision:
3:5dc0023e6284
First approach of EthernetService class

Who changed what in which revision?

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