Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.

Dependents:   1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB

Fork of mbed by mbed official

Committer:
elijahorr
Date:
Thu Apr 14 07:28:54 2016 +0000
Revision:
121:672067c3ada4
Parent:
102:da0ca467f8b5
.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 102:da0ca467f8b5 1 /* mbed Microcontroller Library - LPC24xx CMSIS-like structs
Kojto 102:da0ca467f8b5 2 * Copyright (C) 2009-2015 ARM Limited. All rights reserved.
Kojto 102:da0ca467f8b5 3 *
Kojto 102:da0ca467f8b5 4 * An LPC24xx header file, based on LPC23xx.h
Kojto 102:da0ca467f8b5 5 */
Kojto 102:da0ca467f8b5 6
Kojto 102:da0ca467f8b5 7 #ifndef __LPC24xx_H
Kojto 102:da0ca467f8b5 8 #define __LPC24xx_H
Kojto 102:da0ca467f8b5 9
Kojto 102:da0ca467f8b5 10 #ifdef __cplusplus
Kojto 102:da0ca467f8b5 11 extern "C" {
Kojto 102:da0ca467f8b5 12 #endif
Kojto 102:da0ca467f8b5 13
Kojto 102:da0ca467f8b5 14 /*
Kojto 102:da0ca467f8b5 15 * ==========================================================================
Kojto 102:da0ca467f8b5 16 * ---------- Interrupt Number Definition -----------------------------------
Kojto 102:da0ca467f8b5 17 * ==========================================================================
Kojto 102:da0ca467f8b5 18 */
Kojto 102:da0ca467f8b5 19
Kojto 102:da0ca467f8b5 20 typedef enum IRQn
Kojto 102:da0ca467f8b5 21 {
Kojto 102:da0ca467f8b5 22 /****** LPC23xx Specific Interrupt Numbers *******************************************************/
Kojto 102:da0ca467f8b5 23 WDT_IRQn = 0, /*!< Watchdog Timer Interrupt */
Kojto 102:da0ca467f8b5 24
Kojto 102:da0ca467f8b5 25 TIMER0_IRQn = 4, /*!< Timer0 Interrupt */
Kojto 102:da0ca467f8b5 26 TIMER1_IRQn = 5, /*!< Timer1 Interrupt */
Kojto 102:da0ca467f8b5 27 UART0_IRQn = 6, /*!< UART0 Interrupt */
Kojto 102:da0ca467f8b5 28 UART1_IRQn = 7, /*!< UART1 Interrupt */
Kojto 102:da0ca467f8b5 29 PWM0_IRQn = 8, /*!< PWM0 Interrupt */
Kojto 102:da0ca467f8b5 30 PWM1_IRQn = 8, /*!< PWM1 Interrupt */
Kojto 102:da0ca467f8b5 31 I2C0_IRQn = 9, /*!< I2C0 Interrupt */
Kojto 102:da0ca467f8b5 32 SPI_IRQn = 10, /*!< SPI Interrupt */
Kojto 102:da0ca467f8b5 33 SSP0_IRQn = 10, /*!< SSP0 Interrupt */
Kojto 102:da0ca467f8b5 34 SSP1_IRQn = 11, /*!< SSP1 Interrupt */
Kojto 102:da0ca467f8b5 35 PLL0_IRQn = 12, /*!< PLL0 Lock (Main PLL) Interrupt */
Kojto 102:da0ca467f8b5 36 RTC_IRQn = 13, /*!< Real Time Clock Interrupt */
Kojto 102:da0ca467f8b5 37 EINT0_IRQn = 14, /*!< External Interrupt 0 Interrupt */
Kojto 102:da0ca467f8b5 38 EINT1_IRQn = 15, /*!< External Interrupt 1 Interrupt */
Kojto 102:da0ca467f8b5 39 EINT2_IRQn = 16, /*!< External Interrupt 2 Interrupt */
Kojto 102:da0ca467f8b5 40 EINT3_IRQn = 17, /*!< External Interrupt 3 Interrupt */
Kojto 102:da0ca467f8b5 41 ADC_IRQn = 18, /*!< A/D Converter Interrupt */
Kojto 102:da0ca467f8b5 42 I2C1_IRQn = 19, /*!< I2C1 Interrupt */
Kojto 102:da0ca467f8b5 43 BOD_IRQn = 20, /*!< Brown-Out Detect Interrupt */
Kojto 102:da0ca467f8b5 44 ENET_IRQn = 21, /*!< Ethernet Interrupt */
Kojto 102:da0ca467f8b5 45 USB_IRQn = 22, /*!< USB Interrupt */
Kojto 102:da0ca467f8b5 46 CAN_IRQn = 23, /*!< CAN Interrupt */
Kojto 102:da0ca467f8b5 47 SDMMC_IRQn = 24, /*!< SD/MMC Interrupt */
Kojto 102:da0ca467f8b5 48 DMA_IRQn = 25, /*!< General Purpose DMA Interrupt */
Kojto 102:da0ca467f8b5 49 TIMER2_IRQn = 26, /*!< Timer2 Interrupt */
Kojto 102:da0ca467f8b5 50 TIMER3_IRQn = 27, /*!< Timer3 Interrupt */
Kojto 102:da0ca467f8b5 51 UART2_IRQn = 28, /*!< UART2 Interrupt */
Kojto 102:da0ca467f8b5 52 UART3_IRQn = 29, /*!< UART3 Interrupt */
Kojto 102:da0ca467f8b5 53 I2C2_IRQn = 30, /*!< I2C2 Interrupt */
Kojto 102:da0ca467f8b5 54 I2S_IRQn = 31, /*!< I2S Interrupt */
Kojto 102:da0ca467f8b5 55 } IRQn_Type;
Kojto 102:da0ca467f8b5 56
Kojto 102:da0ca467f8b5 57 /*
Kojto 102:da0ca467f8b5 58 * ==========================================================================
Kojto 102:da0ca467f8b5 59 * ----------- Processor and Core Peripheral Section ------------------------
Kojto 102:da0ca467f8b5 60 * ==========================================================================
Kojto 102:da0ca467f8b5 61 */
Kojto 102:da0ca467f8b5 62
Kojto 102:da0ca467f8b5 63 /* Configuration of the ARM7 Processor and Core Peripherals */
Kojto 102:da0ca467f8b5 64 #define __MPU_PRESENT 0 /*!< MPU present or not */
Kojto 102:da0ca467f8b5 65 #define __NVIC_PRIO_BITS 4 /*!< Number of Bits used for Priority Levels */
Kojto 102:da0ca467f8b5 66 #define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */
Kojto 102:da0ca467f8b5 67
Kojto 102:da0ca467f8b5 68
Kojto 102:da0ca467f8b5 69 #include <core_arm7.h>
Kojto 102:da0ca467f8b5 70 #include "system_LPC24xx.h" /* System Header */
Kojto 102:da0ca467f8b5 71
Kojto 102:da0ca467f8b5 72
Kojto 102:da0ca467f8b5 73 /******************************************************************************/
Kojto 102:da0ca467f8b5 74 /* Device Specific Peripheral registers structures */
Kojto 102:da0ca467f8b5 75 /******************************************************************************/
Kojto 102:da0ca467f8b5 76 #if defined ( __CC_ARM )
Kojto 102:da0ca467f8b5 77 #pragma anon_unions
Kojto 102:da0ca467f8b5 78 #endif
Kojto 102:da0ca467f8b5 79
Kojto 102:da0ca467f8b5 80 /*------------- Vector Interupt Controler (VIC) ------------------------------*/
Kojto 102:da0ca467f8b5 81 typedef struct
Kojto 102:da0ca467f8b5 82 {
Kojto 102:da0ca467f8b5 83 __I uint32_t IRQStatus;
Kojto 102:da0ca467f8b5 84 __I uint32_t FIQStatus;
Kojto 102:da0ca467f8b5 85 __I uint32_t RawIntr;
Kojto 102:da0ca467f8b5 86 __IO uint32_t IntSelect;
Kojto 102:da0ca467f8b5 87 __IO uint32_t IntEnable;
Kojto 102:da0ca467f8b5 88 __O uint32_t IntEnClr;
Kojto 102:da0ca467f8b5 89 __IO uint32_t SoftInt;
Kojto 102:da0ca467f8b5 90 __O uint32_t SoftIntClr;
Kojto 102:da0ca467f8b5 91 __IO uint32_t Protection;
Kojto 102:da0ca467f8b5 92 __IO uint32_t SWPriorityMask;
Kojto 102:da0ca467f8b5 93 __IO uint32_t RESERVED0[54];
Kojto 102:da0ca467f8b5 94 __IO uint32_t VectAddr[32];
Kojto 102:da0ca467f8b5 95 __IO uint32_t RESERVED1[32];
Kojto 102:da0ca467f8b5 96 __IO uint32_t VectPriority[32];
Kojto 102:da0ca467f8b5 97 __IO uint32_t RESERVED2[800];
Kojto 102:da0ca467f8b5 98 __IO uint32_t Address;
Kojto 102:da0ca467f8b5 99 } LPC_VIC_TypeDef;
Kojto 102:da0ca467f8b5 100
Kojto 102:da0ca467f8b5 101 /*------------- System Control (SC) ------------------------------------------*/
Kojto 102:da0ca467f8b5 102 typedef struct
Kojto 102:da0ca467f8b5 103 {
Kojto 102:da0ca467f8b5 104 __IO uint32_t MAMCR;
Kojto 102:da0ca467f8b5 105 __IO uint32_t MAMTIM;
Kojto 102:da0ca467f8b5 106 uint32_t RESERVED0[14];
Kojto 102:da0ca467f8b5 107 __IO uint32_t MEMMAP;
Kojto 102:da0ca467f8b5 108 uint32_t RESERVED1[15];
Kojto 102:da0ca467f8b5 109 __IO uint32_t PLL0CON; /* Clocking and Power Control */
Kojto 102:da0ca467f8b5 110 __IO uint32_t PLL0CFG;
Kojto 102:da0ca467f8b5 111 __I uint32_t PLL0STAT;
Kojto 102:da0ca467f8b5 112 __O uint32_t PLL0FEED;
Kojto 102:da0ca467f8b5 113 uint32_t RESERVED2[12];
Kojto 102:da0ca467f8b5 114 __IO uint32_t PCON;
Kojto 102:da0ca467f8b5 115 __IO uint32_t PCONP;
Kojto 102:da0ca467f8b5 116 uint32_t RESERVED3[15];
Kojto 102:da0ca467f8b5 117 __IO uint32_t CCLKCFG;
Kojto 102:da0ca467f8b5 118 __IO uint32_t USBCLKCFG;
Kojto 102:da0ca467f8b5 119 __IO uint32_t CLKSRCSEL;
Kojto 102:da0ca467f8b5 120 uint32_t RESERVED4[12];
Kojto 102:da0ca467f8b5 121 __IO uint32_t EXTINT; /* External Interrupts */
Kojto 102:da0ca467f8b5 122 __IO uint32_t INTWAKE;
Kojto 102:da0ca467f8b5 123 __IO uint32_t EXTMODE;
Kojto 102:da0ca467f8b5 124 __IO uint32_t EXTPOLAR;
Kojto 102:da0ca467f8b5 125 uint32_t RESERVED6[12];
Kojto 102:da0ca467f8b5 126 __IO uint32_t RSID; /* Reset */
Kojto 102:da0ca467f8b5 127 __IO uint32_t CSPR;
Kojto 102:da0ca467f8b5 128 __IO uint32_t AHBCFG1;
Kojto 102:da0ca467f8b5 129 __IO uint32_t AHBCFG2;
Kojto 102:da0ca467f8b5 130 uint32_t RESERVED7[4];
Kojto 102:da0ca467f8b5 131 __IO uint32_t SCS; /* Syscon Miscellaneous Registers */
Kojto 102:da0ca467f8b5 132 __IO uint32_t IRCTRIM; /* Clock Dividers */
Kojto 102:da0ca467f8b5 133 __IO uint32_t PCLKSEL0;
Kojto 102:da0ca467f8b5 134 __IO uint32_t PCLKSEL1;
Kojto 102:da0ca467f8b5 135 uint32_t RESERVED8[4];
Kojto 102:da0ca467f8b5 136 __IO uint32_t USBIntSt; /* USB Device/OTG Interrupt Register */
Kojto 102:da0ca467f8b5 137 uint32_t RESERVED9;
Kojto 102:da0ca467f8b5 138 // __IO uint32_t CLKOUTCFG; /* Clock Output Configuration */
Kojto 102:da0ca467f8b5 139 } LPC_SC_TypeDef;
Kojto 102:da0ca467f8b5 140
Kojto 102:da0ca467f8b5 141 /*------------- Pin Connect Block (PINCON) -----------------------------------*/
Kojto 102:da0ca467f8b5 142 typedef struct
Kojto 102:da0ca467f8b5 143 {
Kojto 102:da0ca467f8b5 144 __IO uint32_t PINSEL0;
Kojto 102:da0ca467f8b5 145 __IO uint32_t PINSEL1;
Kojto 102:da0ca467f8b5 146 __IO uint32_t PINSEL2;
Kojto 102:da0ca467f8b5 147 __IO uint32_t PINSEL3;
Kojto 102:da0ca467f8b5 148 __IO uint32_t PINSEL4;
Kojto 102:da0ca467f8b5 149 __IO uint32_t PINSEL5;
Kojto 102:da0ca467f8b5 150 __IO uint32_t PINSEL6;
Kojto 102:da0ca467f8b5 151 __IO uint32_t PINSEL7;
Kojto 102:da0ca467f8b5 152 __IO uint32_t PINSEL8;
Kojto 102:da0ca467f8b5 153 __IO uint32_t PINSEL9;
Kojto 102:da0ca467f8b5 154 __IO uint32_t PINSEL10;
Kojto 102:da0ca467f8b5 155 uint32_t RESERVED0[5];
Kojto 102:da0ca467f8b5 156 __IO uint32_t PINMODE0;
Kojto 102:da0ca467f8b5 157 __IO uint32_t PINMODE1;
Kojto 102:da0ca467f8b5 158 __IO uint32_t PINMODE2;
Kojto 102:da0ca467f8b5 159 __IO uint32_t PINMODE3;
Kojto 102:da0ca467f8b5 160 __IO uint32_t PINMODE4;
Kojto 102:da0ca467f8b5 161 __IO uint32_t PINMODE5;
Kojto 102:da0ca467f8b5 162 __IO uint32_t PINMODE6;
Kojto 102:da0ca467f8b5 163 __IO uint32_t PINMODE7;
Kojto 102:da0ca467f8b5 164 __IO uint32_t PINMODE8;
Kojto 102:da0ca467f8b5 165 __IO uint32_t PINMODE9;
Kojto 102:da0ca467f8b5 166 __IO uint32_t PINMODE_OD0;
Kojto 102:da0ca467f8b5 167 __IO uint32_t PINMODE_OD1;
Kojto 102:da0ca467f8b5 168 __IO uint32_t PINMODE_OD2;
Kojto 102:da0ca467f8b5 169 __IO uint32_t PINMODE_OD3;
Kojto 102:da0ca467f8b5 170 __IO uint32_t PINMODE_OD4;
Kojto 102:da0ca467f8b5 171 } LPC_PINCON_TypeDef;
Kojto 102:da0ca467f8b5 172
Kojto 102:da0ca467f8b5 173 #define PCTIM0 1
Kojto 102:da0ca467f8b5 174 #define PCTIM1 2
Kojto 102:da0ca467f8b5 175 #define PCUART0 3
Kojto 102:da0ca467f8b5 176 #define PCUART1 4
Kojto 102:da0ca467f8b5 177 #define PCPWM1 6
Kojto 102:da0ca467f8b5 178 #define PCI2C0 7
Kojto 102:da0ca467f8b5 179 #define PCSPI 8
Kojto 102:da0ca467f8b5 180 #define PCRTC 9
Kojto 102:da0ca467f8b5 181 #define PCSSP1 10
Kojto 102:da0ca467f8b5 182 #define PCEMC 11
Kojto 102:da0ca467f8b5 183 #define PCADC 12
Kojto 102:da0ca467f8b5 184 #define PCAN1 13
Kojto 102:da0ca467f8b5 185 #define PCAN2 14
Kojto 102:da0ca467f8b5 186 #define PCI2C1 19
Kojto 102:da0ca467f8b5 187 #define PCSSP0 21
Kojto 102:da0ca467f8b5 188 #define PCTIM2 22
Kojto 102:da0ca467f8b5 189 #define PCTIM3 23
Kojto 102:da0ca467f8b5 190 #define PCUART2 24
Kojto 102:da0ca467f8b5 191 #define PCUART3 25
Kojto 102:da0ca467f8b5 192 #define PCI2C2 26
Kojto 102:da0ca467f8b5 193 #define PCI2S 27
Kojto 102:da0ca467f8b5 194 #define PCSDC 28
Kojto 102:da0ca467f8b5 195 #define PCGPDMA 29
Kojto 102:da0ca467f8b5 196 #define PCENET 30
Kojto 102:da0ca467f8b5 197 #define PCUSB 31
Kojto 102:da0ca467f8b5 198
Kojto 102:da0ca467f8b5 199 /*------------- General Purpose Input/Output (GPIO) --------------------------*/
Kojto 102:da0ca467f8b5 200 typedef struct
Kojto 102:da0ca467f8b5 201 {
Kojto 102:da0ca467f8b5 202 __IO uint32_t FIODIR;
Kojto 102:da0ca467f8b5 203 uint32_t RESERVED0[3];
Kojto 102:da0ca467f8b5 204 __IO uint32_t FIOMASK;
Kojto 102:da0ca467f8b5 205 __IO uint32_t FIOPIN;
Kojto 102:da0ca467f8b5 206 __IO uint32_t FIOSET;
Kojto 102:da0ca467f8b5 207 __O uint32_t FIOCLR;
Kojto 102:da0ca467f8b5 208 } LPC_GPIO_TypeDef;
Kojto 102:da0ca467f8b5 209
Kojto 102:da0ca467f8b5 210 typedef struct
Kojto 102:da0ca467f8b5 211 {
Kojto 102:da0ca467f8b5 212 __I uint32_t IntStatus;
Kojto 102:da0ca467f8b5 213 __I uint32_t IO0IntStatR;
Kojto 102:da0ca467f8b5 214 __I uint32_t IO0IntStatF;
Kojto 102:da0ca467f8b5 215 __O uint32_t IO0IntClr;
Kojto 102:da0ca467f8b5 216 __IO uint32_t IO0IntEnR;
Kojto 102:da0ca467f8b5 217 __IO uint32_t IO0IntEnF;
Kojto 102:da0ca467f8b5 218 uint32_t RESERVED0[3];
Kojto 102:da0ca467f8b5 219 __I uint32_t IO2IntStatR;
Kojto 102:da0ca467f8b5 220 __I uint32_t IO2IntStatF;
Kojto 102:da0ca467f8b5 221 __O uint32_t IO2IntClr;
Kojto 102:da0ca467f8b5 222 __IO uint32_t IO2IntEnR;
Kojto 102:da0ca467f8b5 223 __IO uint32_t IO2IntEnF;
Kojto 102:da0ca467f8b5 224 } LPC_GPIOINT_TypeDef;
Kojto 102:da0ca467f8b5 225
Kojto 102:da0ca467f8b5 226 /*------------- Timer (TIM) --------------------------------------------------*/
Kojto 102:da0ca467f8b5 227 typedef struct
Kojto 102:da0ca467f8b5 228 {
Kojto 102:da0ca467f8b5 229 __IO uint32_t IR;
Kojto 102:da0ca467f8b5 230 __IO uint32_t TCR;
Kojto 102:da0ca467f8b5 231 __IO uint32_t TC;
Kojto 102:da0ca467f8b5 232 __IO uint32_t PR;
Kojto 102:da0ca467f8b5 233 __IO uint32_t PC;
Kojto 102:da0ca467f8b5 234 __IO uint32_t MCR;
Kojto 102:da0ca467f8b5 235 __IO uint32_t MR0;
Kojto 102:da0ca467f8b5 236 __IO uint32_t MR1;
Kojto 102:da0ca467f8b5 237 __IO uint32_t MR2;
Kojto 102:da0ca467f8b5 238 __IO uint32_t MR3;
Kojto 102:da0ca467f8b5 239 __IO uint32_t CCR;
Kojto 102:da0ca467f8b5 240 __I uint32_t CR0;
Kojto 102:da0ca467f8b5 241 __I uint32_t CR1;
Kojto 102:da0ca467f8b5 242 uint32_t RESERVED0[2];
Kojto 102:da0ca467f8b5 243 __IO uint32_t EMR;
Kojto 102:da0ca467f8b5 244 uint32_t RESERVED1[12];
Kojto 102:da0ca467f8b5 245 __IO uint32_t CTCR;
Kojto 102:da0ca467f8b5 246 } LPC_TIM_TypeDef;
Kojto 102:da0ca467f8b5 247
Kojto 102:da0ca467f8b5 248 /*------------- Pulse-Width Modulation (PWM) ---------------------------------*/
Kojto 102:da0ca467f8b5 249 typedef struct
Kojto 102:da0ca467f8b5 250 {
Kojto 102:da0ca467f8b5 251 __IO uint32_t IR;
Kojto 102:da0ca467f8b5 252 __IO uint32_t TCR;
Kojto 102:da0ca467f8b5 253 __IO uint32_t TC;
Kojto 102:da0ca467f8b5 254 __IO uint32_t PR;
Kojto 102:da0ca467f8b5 255 __IO uint32_t PC;
Kojto 102:da0ca467f8b5 256 __IO uint32_t MCR;
Kojto 102:da0ca467f8b5 257 __IO uint32_t MR0;
Kojto 102:da0ca467f8b5 258 __IO uint32_t MR1;
Kojto 102:da0ca467f8b5 259 __IO uint32_t MR2;
Kojto 102:da0ca467f8b5 260 __IO uint32_t MR3;
Kojto 102:da0ca467f8b5 261 __IO uint32_t CCR;
Kojto 102:da0ca467f8b5 262 __I uint32_t CR0;
Kojto 102:da0ca467f8b5 263 __I uint32_t CR1;
Kojto 102:da0ca467f8b5 264 __I uint32_t CR2;
Kojto 102:da0ca467f8b5 265 __I uint32_t CR3;
Kojto 102:da0ca467f8b5 266 uint32_t RESERVED0;
Kojto 102:da0ca467f8b5 267 __IO uint32_t MR4;
Kojto 102:da0ca467f8b5 268 __IO uint32_t MR5;
Kojto 102:da0ca467f8b5 269 __IO uint32_t MR6;
Kojto 102:da0ca467f8b5 270 __IO uint32_t PCR;
Kojto 102:da0ca467f8b5 271 __IO uint32_t LER;
Kojto 102:da0ca467f8b5 272 uint32_t RESERVED1[7];
Kojto 102:da0ca467f8b5 273 __IO uint32_t CTCR;
Kojto 102:da0ca467f8b5 274 } LPC_PWM_TypeDef;
Kojto 102:da0ca467f8b5 275
Kojto 102:da0ca467f8b5 276 /*------------- Universal Asynchronous Receiver Transmitter (UART) -----------*/
Kojto 102:da0ca467f8b5 277 typedef struct
Kojto 102:da0ca467f8b5 278 {
Kojto 102:da0ca467f8b5 279 union {
Kojto 102:da0ca467f8b5 280 __I uint8_t RBR;
Kojto 102:da0ca467f8b5 281 __O uint8_t THR;
Kojto 102:da0ca467f8b5 282 __IO uint8_t DLL;
Kojto 102:da0ca467f8b5 283 uint32_t RESERVED0;
Kojto 102:da0ca467f8b5 284 };
Kojto 102:da0ca467f8b5 285 union {
Kojto 102:da0ca467f8b5 286 __IO uint8_t DLM;
Kojto 102:da0ca467f8b5 287 __IO uint32_t IER;
Kojto 102:da0ca467f8b5 288 };
Kojto 102:da0ca467f8b5 289 union {
Kojto 102:da0ca467f8b5 290 __I uint32_t IIR;
Kojto 102:da0ca467f8b5 291 __O uint8_t FCR;
Kojto 102:da0ca467f8b5 292 };
Kojto 102:da0ca467f8b5 293 __IO uint8_t LCR;
Kojto 102:da0ca467f8b5 294 uint8_t RESERVED1[7];
Kojto 102:da0ca467f8b5 295 __IO uint8_t LSR;
Kojto 102:da0ca467f8b5 296 uint8_t RESERVED2[7];
Kojto 102:da0ca467f8b5 297 __IO uint8_t SCR;
Kojto 102:da0ca467f8b5 298 uint8_t RESERVED3[3];
Kojto 102:da0ca467f8b5 299 __IO uint32_t ACR;
Kojto 102:da0ca467f8b5 300 __IO uint8_t ICR;
Kojto 102:da0ca467f8b5 301 uint8_t RESERVED4[3];
Kojto 102:da0ca467f8b5 302 __IO uint8_t FDR;
Kojto 102:da0ca467f8b5 303 uint8_t RESERVED5[7];
Kojto 102:da0ca467f8b5 304 __IO uint8_t TER;
Kojto 102:da0ca467f8b5 305 uint8_t RESERVED6[27];
Kojto 102:da0ca467f8b5 306 __IO uint8_t RS485CTRL;
Kojto 102:da0ca467f8b5 307 uint8_t RESERVED7[3];
Kojto 102:da0ca467f8b5 308 __IO uint8_t ADRMATCH;
Kojto 102:da0ca467f8b5 309 } LPC_UART_TypeDef;
Kojto 102:da0ca467f8b5 310
Kojto 102:da0ca467f8b5 311 typedef struct
Kojto 102:da0ca467f8b5 312 {
Kojto 102:da0ca467f8b5 313 union {
Kojto 102:da0ca467f8b5 314 __I uint8_t RBR;
Kojto 102:da0ca467f8b5 315 __O uint8_t THR;
Kojto 102:da0ca467f8b5 316 __IO uint8_t DLL;
Kojto 102:da0ca467f8b5 317 uint32_t RESERVED0;
Kojto 102:da0ca467f8b5 318 };
Kojto 102:da0ca467f8b5 319 union {
Kojto 102:da0ca467f8b5 320 __IO uint8_t DLM;
Kojto 102:da0ca467f8b5 321 __IO uint32_t IER;
Kojto 102:da0ca467f8b5 322 };
Kojto 102:da0ca467f8b5 323 union {
Kojto 102:da0ca467f8b5 324 __I uint32_t IIR;
Kojto 102:da0ca467f8b5 325 __O uint8_t FCR;
Kojto 102:da0ca467f8b5 326 };
Kojto 102:da0ca467f8b5 327 __IO uint8_t LCR;
Kojto 102:da0ca467f8b5 328 uint8_t RESERVED1[3];
Kojto 102:da0ca467f8b5 329 __IO uint8_t MCR;
Kojto 102:da0ca467f8b5 330 uint8_t RESERVED2[3];
Kojto 102:da0ca467f8b5 331 __IO uint8_t LSR;
Kojto 102:da0ca467f8b5 332 uint8_t RESERVED3[3];
Kojto 102:da0ca467f8b5 333 __IO uint8_t MSR;
Kojto 102:da0ca467f8b5 334 uint8_t RESERVED4[3];
Kojto 102:da0ca467f8b5 335 __IO uint8_t SCR;
Kojto 102:da0ca467f8b5 336 uint8_t RESERVED5[3];
Kojto 102:da0ca467f8b5 337 __IO uint32_t ACR;
Kojto 102:da0ca467f8b5 338 uint32_t RESERVED6;
Kojto 102:da0ca467f8b5 339 __IO uint32_t FDR;
Kojto 102:da0ca467f8b5 340 uint32_t RESERVED7;
Kojto 102:da0ca467f8b5 341 __IO uint8_t TER;
Kojto 102:da0ca467f8b5 342 uint8_t RESERVED8[27];
Kojto 102:da0ca467f8b5 343 __IO uint8_t RS485CTRL;
Kojto 102:da0ca467f8b5 344 uint8_t RESERVED9[3];
Kojto 102:da0ca467f8b5 345 __IO uint8_t ADRMATCH;
Kojto 102:da0ca467f8b5 346 uint8_t RESERVED10[3];
Kojto 102:da0ca467f8b5 347 __IO uint8_t RS485DLY;
Kojto 102:da0ca467f8b5 348 } LPC_UART1_TypeDef;
Kojto 102:da0ca467f8b5 349
Kojto 102:da0ca467f8b5 350 /*------------- Serial Peripheral Interface (SPI) ----------------------------*/
Kojto 102:da0ca467f8b5 351 typedef struct
Kojto 102:da0ca467f8b5 352 {
Kojto 102:da0ca467f8b5 353 __IO uint32_t SPCR;
Kojto 102:da0ca467f8b5 354 __I uint32_t SPSR;
Kojto 102:da0ca467f8b5 355 __IO uint32_t SPDR;
Kojto 102:da0ca467f8b5 356 __IO uint32_t SPCCR;
Kojto 102:da0ca467f8b5 357 uint32_t RESERVED0[3];
Kojto 102:da0ca467f8b5 358 __IO uint32_t SPINT;
Kojto 102:da0ca467f8b5 359 } LPC_SPI_TypeDef;
Kojto 102:da0ca467f8b5 360
Kojto 102:da0ca467f8b5 361 /*------------- Synchronous Serial Communication (SSP) -----------------------*/
Kojto 102:da0ca467f8b5 362 typedef struct
Kojto 102:da0ca467f8b5 363 {
Kojto 102:da0ca467f8b5 364 __IO uint32_t CR0;
Kojto 102:da0ca467f8b5 365 __IO uint32_t CR1;
Kojto 102:da0ca467f8b5 366 __IO uint32_t DR;
Kojto 102:da0ca467f8b5 367 __I uint32_t SR;
Kojto 102:da0ca467f8b5 368 __IO uint32_t CPSR;
Kojto 102:da0ca467f8b5 369 __IO uint32_t IMSC;
Kojto 102:da0ca467f8b5 370 __IO uint32_t RIS;
Kojto 102:da0ca467f8b5 371 __IO uint32_t MIS;
Kojto 102:da0ca467f8b5 372 __IO uint32_t ICR;
Kojto 102:da0ca467f8b5 373 __IO uint32_t DMACR;
Kojto 102:da0ca467f8b5 374 } LPC_SSP_TypeDef;
Kojto 102:da0ca467f8b5 375
Kojto 102:da0ca467f8b5 376 /*------------- Inter-Integrated Circuit (I2C) -------------------------------*/
Kojto 102:da0ca467f8b5 377 typedef struct
Kojto 102:da0ca467f8b5 378 {
Kojto 102:da0ca467f8b5 379 __IO uint32_t I2CONSET;
Kojto 102:da0ca467f8b5 380 __I uint32_t I2STAT;
Kojto 102:da0ca467f8b5 381 __IO uint32_t I2DAT;
Kojto 102:da0ca467f8b5 382 __IO uint32_t I2ADR0;
Kojto 102:da0ca467f8b5 383 __IO uint32_t I2SCLH;
Kojto 102:da0ca467f8b5 384 __IO uint32_t I2SCLL;
Kojto 102:da0ca467f8b5 385 __O uint32_t I2CONCLR;
Kojto 102:da0ca467f8b5 386 __IO uint32_t MMCTRL;
Kojto 102:da0ca467f8b5 387 __IO uint32_t I2ADR1;
Kojto 102:da0ca467f8b5 388 __IO uint32_t I2ADR2;
Kojto 102:da0ca467f8b5 389 __IO uint32_t I2ADR3;
Kojto 102:da0ca467f8b5 390 __I uint32_t I2DATA_BUFFER;
Kojto 102:da0ca467f8b5 391 __IO uint32_t I2MASK0;
Kojto 102:da0ca467f8b5 392 __IO uint32_t I2MASK1;
Kojto 102:da0ca467f8b5 393 __IO uint32_t I2MASK2;
Kojto 102:da0ca467f8b5 394 __IO uint32_t I2MASK3;
Kojto 102:da0ca467f8b5 395 } LPC_I2C_TypeDef;
Kojto 102:da0ca467f8b5 396
Kojto 102:da0ca467f8b5 397 /*------------- Inter IC Sound (I2S) -----------------------------------------*/
Kojto 102:da0ca467f8b5 398 typedef struct
Kojto 102:da0ca467f8b5 399 {
Kojto 102:da0ca467f8b5 400 __IO uint32_t I2SDAO;
Kojto 102:da0ca467f8b5 401 __I uint32_t I2SDAI;
Kojto 102:da0ca467f8b5 402 __O uint32_t I2STXFIFO;
Kojto 102:da0ca467f8b5 403 __I uint32_t I2SRXFIFO;
Kojto 102:da0ca467f8b5 404 __I uint32_t I2SSTATE;
Kojto 102:da0ca467f8b5 405 __IO uint32_t I2SDMA1;
Kojto 102:da0ca467f8b5 406 __IO uint32_t I2SDMA2;
Kojto 102:da0ca467f8b5 407 __IO uint32_t I2SIRQ;
Kojto 102:da0ca467f8b5 408 __IO uint32_t I2STXRATE;
Kojto 102:da0ca467f8b5 409 __IO uint32_t I2SRXRATE;
Kojto 102:da0ca467f8b5 410 __IO uint32_t I2STXBITRATE;
Kojto 102:da0ca467f8b5 411 __IO uint32_t I2SRXBITRATE;
Kojto 102:da0ca467f8b5 412 __IO uint32_t I2STXMODE;
Kojto 102:da0ca467f8b5 413 __IO uint32_t I2SRXMODE;
Kojto 102:da0ca467f8b5 414 } LPC_I2S_TypeDef;
Kojto 102:da0ca467f8b5 415
Kojto 102:da0ca467f8b5 416 /*------------- Real-Time Clock (RTC) ----------------------------------------*/
Kojto 102:da0ca467f8b5 417 typedef struct
Kojto 102:da0ca467f8b5 418 {
Kojto 102:da0ca467f8b5 419 __IO uint8_t ILR;
Kojto 102:da0ca467f8b5 420 uint8_t RESERVED0[3];
Kojto 102:da0ca467f8b5 421 __IO uint8_t CTC;
Kojto 102:da0ca467f8b5 422 uint8_t RESERVED1[3];
Kojto 102:da0ca467f8b5 423 __IO uint8_t CCR;
Kojto 102:da0ca467f8b5 424 uint8_t RESERVED2[3];
Kojto 102:da0ca467f8b5 425 __IO uint8_t CIIR;
Kojto 102:da0ca467f8b5 426 uint8_t RESERVED3[3];
Kojto 102:da0ca467f8b5 427 __IO uint8_t AMR;
Kojto 102:da0ca467f8b5 428 uint8_t RESERVED4[3];
Kojto 102:da0ca467f8b5 429 __I uint32_t CTIME0;
Kojto 102:da0ca467f8b5 430 __I uint32_t CTIME1;
Kojto 102:da0ca467f8b5 431 __I uint32_t CTIME2;
Kojto 102:da0ca467f8b5 432 __IO uint8_t SEC;
Kojto 102:da0ca467f8b5 433 uint8_t RESERVED5[3];
Kojto 102:da0ca467f8b5 434 __IO uint8_t MIN;
Kojto 102:da0ca467f8b5 435 uint8_t RESERVED6[3];
Kojto 102:da0ca467f8b5 436 __IO uint8_t HOUR;
Kojto 102:da0ca467f8b5 437 uint8_t RESERVED7[3];
Kojto 102:da0ca467f8b5 438 __IO uint8_t DOM;
Kojto 102:da0ca467f8b5 439 uint8_t RESERVED8[3];
Kojto 102:da0ca467f8b5 440 __IO uint8_t DOW;
Kojto 102:da0ca467f8b5 441 uint8_t RESERVED9[3];
Kojto 102:da0ca467f8b5 442 __IO uint16_t DOY;
Kojto 102:da0ca467f8b5 443 uint16_t RESERVED10;
Kojto 102:da0ca467f8b5 444 __IO uint8_t MONTH;
Kojto 102:da0ca467f8b5 445 uint8_t RESERVED11[3];
Kojto 102:da0ca467f8b5 446 __IO uint16_t YEAR;
Kojto 102:da0ca467f8b5 447 uint16_t RESERVED12;
Kojto 102:da0ca467f8b5 448 __IO uint32_t CALIBRATION;
Kojto 102:da0ca467f8b5 449 __IO uint32_t GPREG0;
Kojto 102:da0ca467f8b5 450 __IO uint32_t GPREG1;
Kojto 102:da0ca467f8b5 451 __IO uint32_t GPREG2;
Kojto 102:da0ca467f8b5 452 __IO uint32_t GPREG3;
Kojto 102:da0ca467f8b5 453 __IO uint32_t GPREG4;
Kojto 102:da0ca467f8b5 454 __IO uint8_t WAKEUPDIS;
Kojto 102:da0ca467f8b5 455 uint8_t RESERVED13[3];
Kojto 102:da0ca467f8b5 456 __IO uint8_t PWRCTRL;
Kojto 102:da0ca467f8b5 457 uint8_t RESERVED14[3];
Kojto 102:da0ca467f8b5 458 __IO uint8_t ALSEC;
Kojto 102:da0ca467f8b5 459 uint8_t RESERVED15[3];
Kojto 102:da0ca467f8b5 460 __IO uint8_t ALMIN;
Kojto 102:da0ca467f8b5 461 uint8_t RESERVED16[3];
Kojto 102:da0ca467f8b5 462 __IO uint8_t ALHOUR;
Kojto 102:da0ca467f8b5 463 uint8_t RESERVED17[3];
Kojto 102:da0ca467f8b5 464 __IO uint8_t ALDOM;
Kojto 102:da0ca467f8b5 465 uint8_t RESERVED18[3];
Kojto 102:da0ca467f8b5 466 __IO uint8_t ALDOW;
Kojto 102:da0ca467f8b5 467 uint8_t RESERVED19[3];
Kojto 102:da0ca467f8b5 468 __IO uint16_t ALDOY;
Kojto 102:da0ca467f8b5 469 uint16_t RESERVED20;
Kojto 102:da0ca467f8b5 470 __IO uint8_t ALMON;
Kojto 102:da0ca467f8b5 471 uint8_t RESERVED21[3];
Kojto 102:da0ca467f8b5 472 __IO uint16_t ALYEAR;
Kojto 102:da0ca467f8b5 473 uint16_t RESERVED22;
Kojto 102:da0ca467f8b5 474 } LPC_RTC_TypeDef;
Kojto 102:da0ca467f8b5 475
Kojto 102:da0ca467f8b5 476 /*------------- Watchdog Timer (WDT) -----------------------------------------*/
Kojto 102:da0ca467f8b5 477 typedef struct
Kojto 102:da0ca467f8b5 478 {
Kojto 102:da0ca467f8b5 479 __IO uint8_t WDMOD;
Kojto 102:da0ca467f8b5 480 uint8_t RESERVED0[3];
Kojto 102:da0ca467f8b5 481 __IO uint32_t WDTC;
Kojto 102:da0ca467f8b5 482 __O uint8_t WDFEED;
Kojto 102:da0ca467f8b5 483 uint8_t RESERVED1[3];
Kojto 102:da0ca467f8b5 484 __I uint32_t WDTV;
Kojto 102:da0ca467f8b5 485 __IO uint32_t WDCLKSEL;
Kojto 102:da0ca467f8b5 486 } LPC_WDT_TypeDef;
Kojto 102:da0ca467f8b5 487
Kojto 102:da0ca467f8b5 488 /*------------- Analog-to-Digital Converter (ADC) ----------------------------*/
Kojto 102:da0ca467f8b5 489 typedef struct
Kojto 102:da0ca467f8b5 490 {
Kojto 102:da0ca467f8b5 491 __IO uint32_t ADCR;
Kojto 102:da0ca467f8b5 492 __IO uint32_t ADGDR;
Kojto 102:da0ca467f8b5 493 uint32_t RESERVED0;
Kojto 102:da0ca467f8b5 494 __IO uint32_t ADINTEN;
Kojto 102:da0ca467f8b5 495 __I uint32_t ADDR0;
Kojto 102:da0ca467f8b5 496 __I uint32_t ADDR1;
Kojto 102:da0ca467f8b5 497 __I uint32_t ADDR2;
Kojto 102:da0ca467f8b5 498 __I uint32_t ADDR3;
Kojto 102:da0ca467f8b5 499 __I uint32_t ADDR4;
Kojto 102:da0ca467f8b5 500 __I uint32_t ADDR5;
Kojto 102:da0ca467f8b5 501 __I uint32_t ADDR6;
Kojto 102:da0ca467f8b5 502 __I uint32_t ADDR7;
Kojto 102:da0ca467f8b5 503 __I uint32_t ADSTAT;
Kojto 102:da0ca467f8b5 504 __IO uint32_t ADTRM;
Kojto 102:da0ca467f8b5 505 } LPC_ADC_TypeDef;
Kojto 102:da0ca467f8b5 506
Kojto 102:da0ca467f8b5 507 /*------------- Digital-to-Analog Converter (DAC) ----------------------------*/
Kojto 102:da0ca467f8b5 508 typedef struct
Kojto 102:da0ca467f8b5 509 {
Kojto 102:da0ca467f8b5 510 __IO uint32_t DACR;
Kojto 102:da0ca467f8b5 511 __IO uint32_t DACCTRL;
Kojto 102:da0ca467f8b5 512 __IO uint16_t DACCNTVAL;
Kojto 102:da0ca467f8b5 513 } LPC_DAC_TypeDef;
Kojto 102:da0ca467f8b5 514
Kojto 102:da0ca467f8b5 515 /*------------- Multimedia Card Interface (MCI) ------------------------------*/
Kojto 102:da0ca467f8b5 516 typedef struct
Kojto 102:da0ca467f8b5 517 {
Kojto 102:da0ca467f8b5 518 __IO uint32_t MCIPower; /* Power control */
Kojto 102:da0ca467f8b5 519 __IO uint32_t MCIClock; /* Clock control */
Kojto 102:da0ca467f8b5 520 __IO uint32_t MCIArgument;
Kojto 102:da0ca467f8b5 521 __IO uint32_t MMCCommand;
Kojto 102:da0ca467f8b5 522 __I uint32_t MCIRespCmd;
Kojto 102:da0ca467f8b5 523 __I uint32_t MCIResponse0;
Kojto 102:da0ca467f8b5 524 __I uint32_t MCIResponse1;
Kojto 102:da0ca467f8b5 525 __I uint32_t MCIResponse2;
Kojto 102:da0ca467f8b5 526 __I uint32_t MCIResponse3;
Kojto 102:da0ca467f8b5 527 __IO uint32_t MCIDataTimer;
Kojto 102:da0ca467f8b5 528 __IO uint32_t MCIDataLength;
Kojto 102:da0ca467f8b5 529 __IO uint32_t MCIDataCtrl;
Kojto 102:da0ca467f8b5 530 __I uint32_t MCIDataCnt;
Kojto 102:da0ca467f8b5 531 __I uint32_t MCIStatus;
Kojto 102:da0ca467f8b5 532 __O uint32_t MCIClear;
Kojto 102:da0ca467f8b5 533 __IO uint32_t MCIMask0;
Kojto 102:da0ca467f8b5 534 uint32_t RESERVED1[2];
Kojto 102:da0ca467f8b5 535 __I uint32_t MCIFifoCnt;
Kojto 102:da0ca467f8b5 536 uint32_t RESERVED2[13];
Kojto 102:da0ca467f8b5 537 __IO uint32_t MCIFIFO[16];
Kojto 102:da0ca467f8b5 538 } LPC_MCI_TypeDef;
Kojto 102:da0ca467f8b5 539
Kojto 102:da0ca467f8b5 540 /*------------- Controller Area Network (CAN) --------------------------------*/
Kojto 102:da0ca467f8b5 541 typedef struct
Kojto 102:da0ca467f8b5 542 {
Kojto 102:da0ca467f8b5 543 __IO uint32_t mask[512]; /* ID Masks */
Kojto 102:da0ca467f8b5 544 } LPC_CANAF_RAM_TypeDef;
Kojto 102:da0ca467f8b5 545
Kojto 102:da0ca467f8b5 546 typedef struct /* Acceptance Filter Registers */
Kojto 102:da0ca467f8b5 547 {
Kojto 102:da0ca467f8b5 548 __IO uint32_t AFMR;
Kojto 102:da0ca467f8b5 549 __IO uint32_t SFF_sa;
Kojto 102:da0ca467f8b5 550 __IO uint32_t SFF_GRP_sa;
Kojto 102:da0ca467f8b5 551 __IO uint32_t EFF_sa;
Kojto 102:da0ca467f8b5 552 __IO uint32_t EFF_GRP_sa;
Kojto 102:da0ca467f8b5 553 __IO uint32_t ENDofTable;
Kojto 102:da0ca467f8b5 554 __I uint32_t LUTerrAd;
Kojto 102:da0ca467f8b5 555 __I uint32_t LUTerr;
Kojto 102:da0ca467f8b5 556 __IO uint32_t FCANIE;
Kojto 102:da0ca467f8b5 557 __IO uint32_t FCANIC0;
Kojto 102:da0ca467f8b5 558 __IO uint32_t FCANIC1;
Kojto 102:da0ca467f8b5 559 } LPC_CANAF_TypeDef;
Kojto 102:da0ca467f8b5 560
Kojto 102:da0ca467f8b5 561 typedef struct /* Central Registers */
Kojto 102:da0ca467f8b5 562 {
Kojto 102:da0ca467f8b5 563 __I uint32_t CANTxSR;
Kojto 102:da0ca467f8b5 564 __I uint32_t CANRxSR;
Kojto 102:da0ca467f8b5 565 __I uint32_t CANMSR;
Kojto 102:da0ca467f8b5 566 } LPC_CANCR_TypeDef;
Kojto 102:da0ca467f8b5 567
Kojto 102:da0ca467f8b5 568 typedef struct /* Controller Registers */
Kojto 102:da0ca467f8b5 569 {
Kojto 102:da0ca467f8b5 570 __IO uint32_t MOD;
Kojto 102:da0ca467f8b5 571 __O uint32_t CMR;
Kojto 102:da0ca467f8b5 572 __IO uint32_t GSR;
Kojto 102:da0ca467f8b5 573 __I uint32_t ICR;
Kojto 102:da0ca467f8b5 574 __IO uint32_t IER;
Kojto 102:da0ca467f8b5 575 __IO uint32_t BTR;
Kojto 102:da0ca467f8b5 576 __IO uint32_t EWL;
Kojto 102:da0ca467f8b5 577 __I uint32_t SR;
Kojto 102:da0ca467f8b5 578 __IO uint32_t RFS;
Kojto 102:da0ca467f8b5 579 __IO uint32_t RID;
Kojto 102:da0ca467f8b5 580 __IO uint32_t RDA;
Kojto 102:da0ca467f8b5 581 __IO uint32_t RDB;
Kojto 102:da0ca467f8b5 582 __IO uint32_t TFI1;
Kojto 102:da0ca467f8b5 583 __IO uint32_t TID1;
Kojto 102:da0ca467f8b5 584 __IO uint32_t TDA1;
Kojto 102:da0ca467f8b5 585 __IO uint32_t TDB1;
Kojto 102:da0ca467f8b5 586 __IO uint32_t TFI2;
Kojto 102:da0ca467f8b5 587 __IO uint32_t TID2;
Kojto 102:da0ca467f8b5 588 __IO uint32_t TDA2;
Kojto 102:da0ca467f8b5 589 __IO uint32_t TDB2;
Kojto 102:da0ca467f8b5 590 __IO uint32_t TFI3;
Kojto 102:da0ca467f8b5 591 __IO uint32_t TID3;
Kojto 102:da0ca467f8b5 592 __IO uint32_t TDA3;
Kojto 102:da0ca467f8b5 593 __IO uint32_t TDB3;
Kojto 102:da0ca467f8b5 594 } LPC_CAN_TypeDef;
Kojto 102:da0ca467f8b5 595
Kojto 102:da0ca467f8b5 596 /*------------- General Purpose Direct Memory Access (GPDMA) -----------------*/
Kojto 102:da0ca467f8b5 597 typedef struct /* Common Registers */
Kojto 102:da0ca467f8b5 598 {
Kojto 102:da0ca467f8b5 599 __I uint32_t DMACIntStat;
Kojto 102:da0ca467f8b5 600 __I uint32_t DMACIntTCStat;
Kojto 102:da0ca467f8b5 601 __O uint32_t DMACIntTCClear;
Kojto 102:da0ca467f8b5 602 __I uint32_t DMACIntErrStat;
Kojto 102:da0ca467f8b5 603 __O uint32_t DMACIntErrClr;
Kojto 102:da0ca467f8b5 604 __I uint32_t DMACRawIntTCStat;
Kojto 102:da0ca467f8b5 605 __I uint32_t DMACRawIntErrStat;
Kojto 102:da0ca467f8b5 606 __I uint32_t DMACEnbldChns;
Kojto 102:da0ca467f8b5 607 __IO uint32_t DMACSoftBReq;
Kojto 102:da0ca467f8b5 608 __IO uint32_t DMACSoftSReq;
Kojto 102:da0ca467f8b5 609 __IO uint32_t DMACSoftLBReq;
Kojto 102:da0ca467f8b5 610 __IO uint32_t DMACSoftLSReq;
Kojto 102:da0ca467f8b5 611 __IO uint32_t DMACConfig;
Kojto 102:da0ca467f8b5 612 __IO uint32_t DMACSync;
Kojto 102:da0ca467f8b5 613 } LPC_GPDMA_TypeDef;
Kojto 102:da0ca467f8b5 614
Kojto 102:da0ca467f8b5 615 typedef struct /* Channel Registers */
Kojto 102:da0ca467f8b5 616 {
Kojto 102:da0ca467f8b5 617 __IO uint32_t DMACCSrcAddr;
Kojto 102:da0ca467f8b5 618 __IO uint32_t DMACCDestAddr;
Kojto 102:da0ca467f8b5 619 __IO uint32_t DMACCLLI;
Kojto 102:da0ca467f8b5 620 __IO uint32_t DMACCControl;
Kojto 102:da0ca467f8b5 621 __IO uint32_t DMACCConfig;
Kojto 102:da0ca467f8b5 622 } LPC_GPDMACH_TypeDef;
Kojto 102:da0ca467f8b5 623
Kojto 102:da0ca467f8b5 624 /*------------- Universal Serial Bus (USB) -----------------------------------*/
Kojto 102:da0ca467f8b5 625 typedef struct
Kojto 102:da0ca467f8b5 626 {
Kojto 102:da0ca467f8b5 627 __I uint32_t HcRevision; /* USB Host Registers */
Kojto 102:da0ca467f8b5 628 __IO uint32_t HcControl;
Kojto 102:da0ca467f8b5 629 __IO uint32_t HcCommandStatus;
Kojto 102:da0ca467f8b5 630 __IO uint32_t HcInterruptStatus;
Kojto 102:da0ca467f8b5 631 __IO uint32_t HcInterruptEnable;
Kojto 102:da0ca467f8b5 632 __IO uint32_t HcInterruptDisable;
Kojto 102:da0ca467f8b5 633 __IO uint32_t HcHCCA;
Kojto 102:da0ca467f8b5 634 __I uint32_t HcPeriodCurrentED;
Kojto 102:da0ca467f8b5 635 __IO uint32_t HcControlHeadED;
Kojto 102:da0ca467f8b5 636 __IO uint32_t HcControlCurrentED;
Kojto 102:da0ca467f8b5 637 __IO uint32_t HcBulkHeadED;
Kojto 102:da0ca467f8b5 638 __IO uint32_t HcBulkCurrentED;
Kojto 102:da0ca467f8b5 639 __I uint32_t HcDoneHead;
Kojto 102:da0ca467f8b5 640 __IO uint32_t HcFmInterval;
Kojto 102:da0ca467f8b5 641 __I uint32_t HcFmRemaining;
Kojto 102:da0ca467f8b5 642 __I uint32_t HcFmNumber;
Kojto 102:da0ca467f8b5 643 __IO uint32_t HcPeriodicStart;
Kojto 102:da0ca467f8b5 644 __IO uint32_t HcLSTreshold;
Kojto 102:da0ca467f8b5 645 __IO uint32_t HcRhDescriptorA;
Kojto 102:da0ca467f8b5 646 __IO uint32_t HcRhDescriptorB;
Kojto 102:da0ca467f8b5 647 __IO uint32_t HcRhStatus;
Kojto 102:da0ca467f8b5 648 __IO uint32_t HcRhPortStatus1;
Kojto 102:da0ca467f8b5 649 __IO uint32_t HcRhPortStatus2;
Kojto 102:da0ca467f8b5 650 uint32_t RESERVED0[40];
Kojto 102:da0ca467f8b5 651 __I uint32_t Module_ID;
Kojto 102:da0ca467f8b5 652
Kojto 102:da0ca467f8b5 653 __I uint32_t OTGIntSt; /* USB On-The-Go Registers */
Kojto 102:da0ca467f8b5 654 __IO uint32_t OTGIntEn;
Kojto 102:da0ca467f8b5 655 __O uint32_t OTGIntSet;
Kojto 102:da0ca467f8b5 656 __O uint32_t OTGIntClr;
Kojto 102:da0ca467f8b5 657 __IO uint32_t OTGStCtrl;
Kojto 102:da0ca467f8b5 658 __IO uint32_t OTGTmr;
Kojto 102:da0ca467f8b5 659 uint32_t RESERVED1[58];
Kojto 102:da0ca467f8b5 660
Kojto 102:da0ca467f8b5 661 __I uint32_t USBDevIntSt; /* USB Device Interrupt Registers */
Kojto 102:da0ca467f8b5 662 __IO uint32_t USBDevIntEn;
Kojto 102:da0ca467f8b5 663 __O uint32_t USBDevIntClr;
Kojto 102:da0ca467f8b5 664 __O uint32_t USBDevIntSet;
Kojto 102:da0ca467f8b5 665
Kojto 102:da0ca467f8b5 666 __O uint32_t USBCmdCode; /* USB Device SIE Command Registers */
Kojto 102:da0ca467f8b5 667 __I uint32_t USBCmdData;
Kojto 102:da0ca467f8b5 668
Kojto 102:da0ca467f8b5 669 __I uint32_t USBRxData; /* USB Device Transfer Registers */
Kojto 102:da0ca467f8b5 670 __O uint32_t USBTxData;
Kojto 102:da0ca467f8b5 671 __I uint32_t USBRxPLen;
Kojto 102:da0ca467f8b5 672 __O uint32_t USBTxPLen;
Kojto 102:da0ca467f8b5 673 __IO uint32_t USBCtrl;
Kojto 102:da0ca467f8b5 674 __O uint32_t USBDevIntPri;
Kojto 102:da0ca467f8b5 675
Kojto 102:da0ca467f8b5 676 __I uint32_t USBEpIntSt; /* USB Device Endpoint Interrupt Regs */
Kojto 102:da0ca467f8b5 677 __IO uint32_t USBEpIntEn;
Kojto 102:da0ca467f8b5 678 __O uint32_t USBEpIntClr;
Kojto 102:da0ca467f8b5 679 __O uint32_t USBEpIntSet;
Kojto 102:da0ca467f8b5 680 __O uint32_t USBEpIntPri;
Kojto 102:da0ca467f8b5 681
Kojto 102:da0ca467f8b5 682 __IO uint32_t USBReEp; /* USB Device Endpoint Realization Reg*/
Kojto 102:da0ca467f8b5 683 __O uint32_t USBEpInd;
Kojto 102:da0ca467f8b5 684 __IO uint32_t USBMaxPSize;
Kojto 102:da0ca467f8b5 685
Kojto 102:da0ca467f8b5 686 __I uint32_t USBDMARSt; /* USB Device DMA Registers */
Kojto 102:da0ca467f8b5 687 __O uint32_t USBDMARClr;
Kojto 102:da0ca467f8b5 688 __O uint32_t USBDMARSet;
Kojto 102:da0ca467f8b5 689 uint32_t RESERVED2[9];
Kojto 102:da0ca467f8b5 690 __IO uint32_t USBUDCAH;
Kojto 102:da0ca467f8b5 691 __I uint32_t USBEpDMASt;
Kojto 102:da0ca467f8b5 692 __O uint32_t USBEpDMAEn;
Kojto 102:da0ca467f8b5 693 __O uint32_t USBEpDMADis;
Kojto 102:da0ca467f8b5 694 __I uint32_t USBDMAIntSt;
Kojto 102:da0ca467f8b5 695 __IO uint32_t USBDMAIntEn;
Kojto 102:da0ca467f8b5 696 uint32_t RESERVED3[2];
Kojto 102:da0ca467f8b5 697 __I uint32_t USBEoTIntSt;
Kojto 102:da0ca467f8b5 698 __O uint32_t USBEoTIntClr;
Kojto 102:da0ca467f8b5 699 __O uint32_t USBEoTIntSet;
Kojto 102:da0ca467f8b5 700 __I uint32_t USBNDDRIntSt;
Kojto 102:da0ca467f8b5 701 __O uint32_t USBNDDRIntClr;
Kojto 102:da0ca467f8b5 702 __O uint32_t USBNDDRIntSet;
Kojto 102:da0ca467f8b5 703 __I uint32_t USBSysErrIntSt;
Kojto 102:da0ca467f8b5 704 __O uint32_t USBSysErrIntClr;
Kojto 102:da0ca467f8b5 705 __O uint32_t USBSysErrIntSet;
Kojto 102:da0ca467f8b5 706 uint32_t RESERVED4[15];
Kojto 102:da0ca467f8b5 707
Kojto 102:da0ca467f8b5 708 __I uint32_t I2C_RX; /* USB OTG I2C Registers */
Kojto 102:da0ca467f8b5 709 __O uint32_t I2C_WO;
Kojto 102:da0ca467f8b5 710 __I uint32_t I2C_STS;
Kojto 102:da0ca467f8b5 711 __IO uint32_t I2C_CTL;
Kojto 102:da0ca467f8b5 712 __IO uint32_t I2C_CLKHI;
Kojto 102:da0ca467f8b5 713 __O uint32_t I2C_CLKLO;
Kojto 102:da0ca467f8b5 714 uint32_t RESERVED5[823];
Kojto 102:da0ca467f8b5 715
Kojto 102:da0ca467f8b5 716 union {
Kojto 102:da0ca467f8b5 717 __IO uint32_t USBClkCtrl; /* USB Clock Control Registers */
Kojto 102:da0ca467f8b5 718 __IO uint32_t OTGClkCtrl;
Kojto 102:da0ca467f8b5 719 };
Kojto 102:da0ca467f8b5 720 union {
Kojto 102:da0ca467f8b5 721 __I uint32_t USBClkSt;
Kojto 102:da0ca467f8b5 722 __I uint32_t OTGClkSt;
Kojto 102:da0ca467f8b5 723 };
Kojto 102:da0ca467f8b5 724 } LPC_USB_TypeDef;
Kojto 102:da0ca467f8b5 725
Kojto 102:da0ca467f8b5 726 /*------------- Ethernet Media Access Controller (EMAC) ----------------------*/
Kojto 102:da0ca467f8b5 727 typedef struct
Kojto 102:da0ca467f8b5 728 {
Kojto 102:da0ca467f8b5 729 __IO uint32_t MAC1; /* MAC Registers */
Kojto 102:da0ca467f8b5 730 __IO uint32_t MAC2;
Kojto 102:da0ca467f8b5 731 __IO uint32_t IPGT;
Kojto 102:da0ca467f8b5 732 __IO uint32_t IPGR;
Kojto 102:da0ca467f8b5 733 __IO uint32_t CLRT;
Kojto 102:da0ca467f8b5 734 __IO uint32_t MAXF;
Kojto 102:da0ca467f8b5 735 __IO uint32_t SUPP;
Kojto 102:da0ca467f8b5 736 __IO uint32_t TEST;
Kojto 102:da0ca467f8b5 737 __IO uint32_t MCFG;
Kojto 102:da0ca467f8b5 738 __IO uint32_t MCMD;
Kojto 102:da0ca467f8b5 739 __IO uint32_t MADR;
Kojto 102:da0ca467f8b5 740 __O uint32_t MWTD;
Kojto 102:da0ca467f8b5 741 __I uint32_t MRDD;
Kojto 102:da0ca467f8b5 742 __I uint32_t MIND;
Kojto 102:da0ca467f8b5 743 uint32_t RESERVED0[2];
Kojto 102:da0ca467f8b5 744 __IO uint32_t SA0;
Kojto 102:da0ca467f8b5 745 __IO uint32_t SA1;
Kojto 102:da0ca467f8b5 746 __IO uint32_t SA2;
Kojto 102:da0ca467f8b5 747 uint32_t RESERVED1[45];
Kojto 102:da0ca467f8b5 748 __IO uint32_t Command; /* Control Registers */
Kojto 102:da0ca467f8b5 749 __I uint32_t Status;
Kojto 102:da0ca467f8b5 750 __IO uint32_t RxDescriptor;
Kojto 102:da0ca467f8b5 751 __IO uint32_t RxStatus;
Kojto 102:da0ca467f8b5 752 __IO uint32_t RxDescriptorNumber;
Kojto 102:da0ca467f8b5 753 __I uint32_t RxProduceIndex;
Kojto 102:da0ca467f8b5 754 __IO uint32_t RxConsumeIndex;
Kojto 102:da0ca467f8b5 755 __IO uint32_t TxDescriptor;
Kojto 102:da0ca467f8b5 756 __IO uint32_t TxStatus;
Kojto 102:da0ca467f8b5 757 __IO uint32_t TxDescriptorNumber;
Kojto 102:da0ca467f8b5 758 __IO uint32_t TxProduceIndex;
Kojto 102:da0ca467f8b5 759 __I uint32_t TxConsumeIndex;
Kojto 102:da0ca467f8b5 760 uint32_t RESERVED2[10];
Kojto 102:da0ca467f8b5 761 __I uint32_t TSV0;
Kojto 102:da0ca467f8b5 762 __I uint32_t TSV1;
Kojto 102:da0ca467f8b5 763 __I uint32_t RSV;
Kojto 102:da0ca467f8b5 764 uint32_t RESERVED3[3];
Kojto 102:da0ca467f8b5 765 __IO uint32_t FlowControlCounter;
Kojto 102:da0ca467f8b5 766 __I uint32_t FlowControlStatus;
Kojto 102:da0ca467f8b5 767 uint32_t RESERVED4[34];
Kojto 102:da0ca467f8b5 768 __IO uint32_t RxFilterCtrl; /* Rx Filter Registers */
Kojto 102:da0ca467f8b5 769 __IO uint32_t RxFilterWoLStatus;
Kojto 102:da0ca467f8b5 770 __IO uint32_t RxFilterWoLClear;
Kojto 102:da0ca467f8b5 771 uint32_t RESERVED5;
Kojto 102:da0ca467f8b5 772 __IO uint32_t HashFilterL;
Kojto 102:da0ca467f8b5 773 __IO uint32_t HashFilterH;
Kojto 102:da0ca467f8b5 774 uint32_t RESERVED6[882];
Kojto 102:da0ca467f8b5 775 __I uint32_t IntStatus; /* Module Control Registers */
Kojto 102:da0ca467f8b5 776 __IO uint32_t IntEnable;
Kojto 102:da0ca467f8b5 777 __O uint32_t IntClear;
Kojto 102:da0ca467f8b5 778 __O uint32_t IntSet;
Kojto 102:da0ca467f8b5 779 uint32_t RESERVED7;
Kojto 102:da0ca467f8b5 780 __IO uint32_t PowerDown;
Kojto 102:da0ca467f8b5 781 uint32_t RESERVED8;
Kojto 102:da0ca467f8b5 782 __IO uint32_t Module_ID;
Kojto 102:da0ca467f8b5 783 } LPC_EMAC_TypeDef;
Kojto 102:da0ca467f8b5 784
Kojto 102:da0ca467f8b5 785 /*-------------------- External Memory Controller (EMC) ----------------------*/
Kojto 102:da0ca467f8b5 786 typedef struct
Kojto 102:da0ca467f8b5 787 {
Kojto 102:da0ca467f8b5 788 __IO uint32_t EMCControl;
Kojto 102:da0ca467f8b5 789 __I uint32_t EMCStatus;
Kojto 102:da0ca467f8b5 790 __IO uint32_t EMCConfig;
Kojto 102:da0ca467f8b5 791 uint32_t RESERVED1[5];
Kojto 102:da0ca467f8b5 792 __IO uint32_t EMCDynamicControl;
Kojto 102:da0ca467f8b5 793 __IO uint32_t EMCDynamicRefresh;
Kojto 102:da0ca467f8b5 794 __IO uint32_t EMCDynamicReadConfig;
Kojto 102:da0ca467f8b5 795 uint32_t RESERVED2;
Kojto 102:da0ca467f8b5 796 __IO uint32_t EMCDynamicRP;
Kojto 102:da0ca467f8b5 797 __IO uint32_t EMCDynamicRAS;
Kojto 102:da0ca467f8b5 798 __IO uint32_t EMCDynamicSREX;
Kojto 102:da0ca467f8b5 799 __IO uint32_t EMCDynamicAPR;
Kojto 102:da0ca467f8b5 800 __IO uint32_t EMCDynamicDAL;
Kojto 102:da0ca467f8b5 801 __IO uint32_t EMCDynamicWR;
Kojto 102:da0ca467f8b5 802 __IO uint32_t EMCDynamicRC;
Kojto 102:da0ca467f8b5 803 __IO uint32_t EMCDynamicRFC;
Kojto 102:da0ca467f8b5 804 __IO uint32_t EMCDynamicXSR;
Kojto 102:da0ca467f8b5 805 __IO uint32_t EMCDynamicRRD;
Kojto 102:da0ca467f8b5 806 __IO uint32_t EMCDynamicMRD;
Kojto 102:da0ca467f8b5 807 uint32_t RESERVED3[9];
Kojto 102:da0ca467f8b5 808 __IO uint32_t EMCStaticExtendedWait;
Kojto 102:da0ca467f8b5 809 uint32_t RESERVED4[31];
Kojto 102:da0ca467f8b5 810 __IO uint32_t EMCDynamicConfig0;
Kojto 102:da0ca467f8b5 811 __IO uint32_t EMCDynamicRasCas0;
Kojto 102:da0ca467f8b5 812 uint32_t RESERVED5[6];
Kojto 102:da0ca467f8b5 813 __IO uint32_t EMCDynamicConfig1;
Kojto 102:da0ca467f8b5 814 __IO uint32_t EMCDynamicRasCas1;
Kojto 102:da0ca467f8b5 815 uint32_t RESERVED6[6];
Kojto 102:da0ca467f8b5 816 __IO uint32_t EMCDynamicConfic2;
Kojto 102:da0ca467f8b5 817 __IO uint32_t EMCDynamicRasCas2;
Kojto 102:da0ca467f8b5 818 uint32_t RESERVED7[6];
Kojto 102:da0ca467f8b5 819 __IO uint32_t EMCDynamicConfig3;
Kojto 102:da0ca467f8b5 820 __IO uint32_t EMCDynamicRasCas3;
Kojto 102:da0ca467f8b5 821 uint32_t RESERVED8[38];
Kojto 102:da0ca467f8b5 822 __IO uint32_t EMCStaticConfig0;
Kojto 102:da0ca467f8b5 823 __IO uint32_t EMCStaticWaitWen0;
Kojto 102:da0ca467f8b5 824 __IO uint32_t EMCStaticWaitOen0;
Kojto 102:da0ca467f8b5 825 __IO uint32_t EMCStaticWaitRd0;
Kojto 102:da0ca467f8b5 826 __IO uint32_t EMCStaticWaitPage0;
Kojto 102:da0ca467f8b5 827 __IO uint32_t EMCStaticWaitWr0;
Kojto 102:da0ca467f8b5 828 __IO uint32_t EMCStaticWaitTurn0;
Kojto 102:da0ca467f8b5 829 uint32_t RESERVED9;
Kojto 102:da0ca467f8b5 830 __IO uint32_t EMCStaticConfig1;
Kojto 102:da0ca467f8b5 831 __IO uint32_t EMCStaticWaitWen1;
Kojto 102:da0ca467f8b5 832 __IO uint32_t EMCStaticWaitOen1;
Kojto 102:da0ca467f8b5 833 __IO uint32_t EMCStaticWaitRd1;
Kojto 102:da0ca467f8b5 834 __IO uint32_t EMCStaticWaitPage1;
Kojto 102:da0ca467f8b5 835 __IO uint32_t EMCStaticWaitWr1;
Kojto 102:da0ca467f8b5 836 __IO uint32_t EMCStaticWaitTurn1;
Kojto 102:da0ca467f8b5 837 uint32_t RESERVED10;
Kojto 102:da0ca467f8b5 838 __IO uint32_t EMCStaticConfig2;
Kojto 102:da0ca467f8b5 839 __IO uint32_t EMCStaticWaitWen2;
Kojto 102:da0ca467f8b5 840 __IO uint32_t EMCStaticWaitOen2;
Kojto 102:da0ca467f8b5 841 __IO uint32_t EMCStaticWaitRd2;
Kojto 102:da0ca467f8b5 842 __IO uint32_t EMCStaticWaitPage2;
Kojto 102:da0ca467f8b5 843 __IO uint32_t EMCStaticWaitWr2;
Kojto 102:da0ca467f8b5 844 __IO uint32_t EMCStaticWaitTurn2;
Kojto 102:da0ca467f8b5 845 uint32_t RESERVED11;
Kojto 102:da0ca467f8b5 846 __IO uint32_t EMCStaticConfig3;
Kojto 102:da0ca467f8b5 847 __IO uint32_t EMCStaticWaitWen3;
Kojto 102:da0ca467f8b5 848 __IO uint32_t EMCStaticWaitOen3;
Kojto 102:da0ca467f8b5 849 __IO uint32_t EMCStaticWaitRd3;
Kojto 102:da0ca467f8b5 850 __IO uint32_t EMCStaticWaitPage3;
Kojto 102:da0ca467f8b5 851 __IO uint32_t EMCStaticWaitWr3;
Kojto 102:da0ca467f8b5 852 __IO uint32_t EMCStaticWaitTurn3;
Kojto 102:da0ca467f8b5 853 } LPC_EMC_TypeDef;
Kojto 102:da0ca467f8b5 854 #if defined ( __CC_ARM )
Kojto 102:da0ca467f8b5 855 #pragma no_anon_unions
Kojto 102:da0ca467f8b5 856 #endif
Kojto 102:da0ca467f8b5 857
Kojto 102:da0ca467f8b5 858 /******************************************************************************/
Kojto 102:da0ca467f8b5 859 /* Peripheral memory map */
Kojto 102:da0ca467f8b5 860 /******************************************************************************/
Kojto 102:da0ca467f8b5 861 /* Base addresses */
Kojto 102:da0ca467f8b5 862
Kojto 102:da0ca467f8b5 863 /* AHB Peripheral # 0 */
Kojto 102:da0ca467f8b5 864
Kojto 102:da0ca467f8b5 865 /*
Kojto 102:da0ca467f8b5 866 #define FLASH_BASE (0x00000000UL)
Kojto 102:da0ca467f8b5 867 #define RAM_BASE (0x10000000UL)
Kojto 102:da0ca467f8b5 868 #define GPIO_BASE (0x2009C000UL)
Kojto 102:da0ca467f8b5 869 #define APB0_BASE (0x40000000UL)
Kojto 102:da0ca467f8b5 870 #define APB1_BASE (0x40080000UL)
Kojto 102:da0ca467f8b5 871 #define AHB_BASE (0x50000000UL)
Kojto 102:da0ca467f8b5 872 #define CM3_BASE (0xE0000000UL)
Kojto 102:da0ca467f8b5 873 */
Kojto 102:da0ca467f8b5 874
Kojto 102:da0ca467f8b5 875 // TODO - #define VIC_BASE_ADDR 0xFFFFF000
Kojto 102:da0ca467f8b5 876
Kojto 102:da0ca467f8b5 877 #define LPC_WDT_BASE (0xE0000000)
Kojto 102:da0ca467f8b5 878 #define LPC_TIM0_BASE (0xE0004000)
Kojto 102:da0ca467f8b5 879 #define LPC_TIM1_BASE (0xE0008000)
Kojto 102:da0ca467f8b5 880 #define LPC_UART0_BASE (0xE000C000)
Kojto 102:da0ca467f8b5 881 #define LPC_UART1_BASE (0xE0010000)
Kojto 102:da0ca467f8b5 882 #define LPC_PWM1_BASE (0xE0018000)
Kojto 102:da0ca467f8b5 883 #define LPC_I2C0_BASE (0xE001C000)
Kojto 102:da0ca467f8b5 884 #define LPC_SPI_BASE (0xE0020000)
Kojto 102:da0ca467f8b5 885 #define LPC_RTC_BASE (0xE0024000)
Kojto 102:da0ca467f8b5 886 #define LPC_GPIOINT_BASE (0xE0028080)
Kojto 102:da0ca467f8b5 887 #define LPC_PINCON_BASE (0xE002C000)
Kojto 102:da0ca467f8b5 888 #define LPC_SSP1_BASE (0xE0030000)
Kojto 102:da0ca467f8b5 889 #define LPC_ADC_BASE (0xE0034000)
Kojto 102:da0ca467f8b5 890 #define LPC_CANAF_RAM_BASE (0xE0038000)
Kojto 102:da0ca467f8b5 891 #define LPC_CANAF_BASE (0xE003C000)
Kojto 102:da0ca467f8b5 892 #define LPC_CANCR_BASE (0xE0040000)
Kojto 102:da0ca467f8b5 893 #define LPC_CAN1_BASE (0xE0044000)
Kojto 102:da0ca467f8b5 894 #define LPC_CAN2_BASE (0xE0048000)
Kojto 102:da0ca467f8b5 895 #define LPC_I2C1_BASE (0xE005C000)
Kojto 102:da0ca467f8b5 896 #define LPC_SSP0_BASE (0xE0068000)
Kojto 102:da0ca467f8b5 897 #define LPC_DAC_BASE (0xE006C000)
Kojto 102:da0ca467f8b5 898 #define LPC_TIM2_BASE (0xE0070000)
Kojto 102:da0ca467f8b5 899 #define LPC_TIM3_BASE (0xE0074000)
Kojto 102:da0ca467f8b5 900 #define LPC_UART2_BASE (0xE0078000)
Kojto 102:da0ca467f8b5 901 #define LPC_UART3_BASE (0xE007C000)
Kojto 102:da0ca467f8b5 902 #define LPC_I2C2_BASE (0xE0080000)
Kojto 102:da0ca467f8b5 903 #define LPC_I2S_BASE (0xE0088000)
Kojto 102:da0ca467f8b5 904 #define LPC_MCI_BASE (0xE008C000)
Kojto 102:da0ca467f8b5 905 #define LPC_SC_BASE (0xE01FC000)
Kojto 102:da0ca467f8b5 906 #define LPC_EMAC_BASE (0xFFE00000)
Kojto 102:da0ca467f8b5 907 #define LPC_GPDMA_BASE (0xFFE04000)
Kojto 102:da0ca467f8b5 908 #define LPC_GPDMACH0_BASE (0xFFE04100)
Kojto 102:da0ca467f8b5 909 #define LPC_GPDMACH1_BASE (0xFFE04120)
Kojto 102:da0ca467f8b5 910 #define LPC_EMC_BASE (0xFFE08000)
Kojto 102:da0ca467f8b5 911 #define LPC_USB_BASE (0xFFE0C000)
Kojto 102:da0ca467f8b5 912 #define LPC_VIC_BASE (0xFFFFF000)
Kojto 102:da0ca467f8b5 913
Kojto 102:da0ca467f8b5 914 /* GPIOs */
Kojto 102:da0ca467f8b5 915 #define LPC_GPIO0_BASE (0x3FFFC000)
Kojto 102:da0ca467f8b5 916 #define LPC_GPIO1_BASE (0x3FFFC020)
Kojto 102:da0ca467f8b5 917 #define LPC_GPIO2_BASE (0x3FFFC040)
Kojto 102:da0ca467f8b5 918 #define LPC_GPIO3_BASE (0x3FFFC060)
Kojto 102:da0ca467f8b5 919 #define LPC_GPIO4_BASE (0x3FFFC080)
Kojto 102:da0ca467f8b5 920
Kojto 102:da0ca467f8b5 921
Kojto 102:da0ca467f8b5 922 /******************************************************************************/
Kojto 102:da0ca467f8b5 923 /* Peripheral declaration */
Kojto 102:da0ca467f8b5 924 /******************************************************************************/
Kojto 102:da0ca467f8b5 925 #define LPC_SC (( LPC_SC_TypeDef *) LPC_SC_BASE)
Kojto 102:da0ca467f8b5 926 #define LPC_GPIO0 (( LPC_GPIO_TypeDef *) LPC_GPIO0_BASE)
Kojto 102:da0ca467f8b5 927 #define LPC_GPIO1 (( LPC_GPIO_TypeDef *) LPC_GPIO1_BASE)
Kojto 102:da0ca467f8b5 928 #define LPC_GPIO2 (( LPC_GPIO_TypeDef *) LPC_GPIO2_BASE)
Kojto 102:da0ca467f8b5 929 #define LPC_GPIO3 (( LPC_GPIO_TypeDef *) LPC_GPIO3_BASE)
Kojto 102:da0ca467f8b5 930 #define LPC_GPIO4 (( LPC_GPIO_TypeDef *) LPC_GPIO4_BASE)
Kojto 102:da0ca467f8b5 931 #define LPC_WDT (( LPC_WDT_TypeDef *) LPC_WDT_BASE)
Kojto 102:da0ca467f8b5 932 #define LPC_TIM0 (( LPC_TIM_TypeDef *) LPC_TIM0_BASE)
Kojto 102:da0ca467f8b5 933 #define LPC_TIM1 (( LPC_TIM_TypeDef *) LPC_TIM1_BASE)
Kojto 102:da0ca467f8b5 934 #define LPC_TIM2 (( LPC_TIM_TypeDef *) LPC_TIM2_BASE)
Kojto 102:da0ca467f8b5 935 #define LPC_TIM3 (( LPC_TIM_TypeDef *) LPC_TIM3_BASE)
Kojto 102:da0ca467f8b5 936 #define LPC_UART0 (( LPC_UART_TypeDef *) LPC_UART0_BASE)
Kojto 102:da0ca467f8b5 937 #define LPC_UART1 (( LPC_UART1_TypeDef *) LPC_UART1_BASE)
Kojto 102:da0ca467f8b5 938 #define LPC_UART2 (( LPC_UART_TypeDef *) LPC_UART2_BASE)
Kojto 102:da0ca467f8b5 939 #define LPC_UART3 (( LPC_UART_TypeDef *) LPC_UART3_BASE)
Kojto 102:da0ca467f8b5 940 #define LPC_PWM1 (( LPC_PWM_TypeDef *) LPC_PWM1_BASE)
Kojto 102:da0ca467f8b5 941 #define LPC_I2C0 (( LPC_I2C_TypeDef *) LPC_I2C0_BASE)
Kojto 102:da0ca467f8b5 942 #define LPC_I2C1 (( LPC_I2C_TypeDef *) LPC_I2C1_BASE)
Kojto 102:da0ca467f8b5 943 #define LPC_I2C2 (( LPC_I2C_TypeDef *) LPC_I2C2_BASE)
Kojto 102:da0ca467f8b5 944 #define LPC_I2S (( LPC_I2S_TypeDef *) LPC_I2S_BASE)
Kojto 102:da0ca467f8b5 945 #define LPC_SPI (( LPC_SPI_TypeDef *) LPC_SPI_BASE)
Kojto 102:da0ca467f8b5 946 #define LPC_RTC (( LPC_RTC_TypeDef *) LPC_RTC_BASE)
Kojto 102:da0ca467f8b5 947 #define LPC_GPIOINT (( LPC_GPIOINT_TypeDef *) LPC_GPIOINT_BASE)
Kojto 102:da0ca467f8b5 948 #define LPC_PINCON (( LPC_PINCON_TypeDef *) LPC_PINCON_BASE)
Kojto 102:da0ca467f8b5 949 #define LPC_SSP0 (( LPC_SSP_TypeDef *) LPC_SSP0_BASE)
Kojto 102:da0ca467f8b5 950 #define LPC_SSP1 (( LPC_SSP_TypeDef *) LPC_SSP1_BASE)
Kojto 102:da0ca467f8b5 951 #define LPC_ADC (( LPC_ADC_TypeDef *) LPC_ADC_BASE)
Kojto 102:da0ca467f8b5 952 #define LPC_DAC (( LPC_DAC_TypeDef *) LPC_DAC_BASE)
Kojto 102:da0ca467f8b5 953 #define LPC_CANAF_RAM ((LPC_CANAF_RAM_TypeDef *) LPC_CANAF_RAM_BASE)
Kojto 102:da0ca467f8b5 954 #define LPC_CANAF (( LPC_CANAF_TypeDef *) LPC_CANAF_BASE)
Kojto 102:da0ca467f8b5 955 #define LPC_CANCR (( LPC_CANCR_TypeDef *) LPC_CANCR_BASE)
Kojto 102:da0ca467f8b5 956 #define LPC_CAN1 (( LPC_CAN_TypeDef *) LPC_CAN1_BASE)
Kojto 102:da0ca467f8b5 957 #define LPC_CAN2 (( LPC_CAN_TypeDef *) LPC_CAN2_BASE)
Kojto 102:da0ca467f8b5 958 #define LPC_MCI (( LPC_MCI_TypeDef *) LPC_MCI_BASE)
Kojto 102:da0ca467f8b5 959 #define LPC_EMAC (( LPC_EMAC_TypeDef *) LPC_EMAC_BASE)
Kojto 102:da0ca467f8b5 960 #define LPC_GPDMA (( LPC_GPDMA_TypeDef *) LPC_GPDMA_BASE)
Kojto 102:da0ca467f8b5 961 #define LPC_GPDMACH0 (( LPC_GPDMACH_TypeDef *) LPC_GPDMACH0_BASE)
Kojto 102:da0ca467f8b5 962 #define LPC_GPDMACH1 (( LPC_GPDMACH_TypeDef *) LPC_GPDMACH1_BASE)
Kojto 102:da0ca467f8b5 963 #define LPC_USB (( LPC_USB_TypeDef *) LPC_USB_BASE)
Kojto 102:da0ca467f8b5 964 #define LPC_VIC (( LPC_VIC_TypeDef *) LPC_VIC_BASE)
Kojto 102:da0ca467f8b5 965 #define LPC_EMC (( LPC_EMC_TypeDef *) LPC_EMC_BASE)
Kojto 102:da0ca467f8b5 966
Kojto 102:da0ca467f8b5 967 #ifdef __cplusplus
Kojto 102:da0ca467f8b5 968 }
Kojto 102:da0ca467f8b5 969 #endif
Kojto 102:da0ca467f8b5 970
Kojto 102:da0ca467f8b5 971 #endif // __LPC24xx_H
Kojto 102:da0ca467f8b5 972