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