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