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