version_2.0
Dependents: cc3000_ping_demo_try_2
Fork of mbed by
LPC812/LPC8xx.h@62:7e6c9f46b3bd, 2013-04-17 (annotated)
- Committer:
- emilmont
- Date:
- Wed Apr 17 15:30:58 2013 +0100
- Revision:
- 62:7e6c9f46b3bd
Add NXP LPC812
[KL25Z] Use channel 0 as a prescaler for channel 1
[CodeSourcery] Fix standard library retargeting removing duplicate "_isatty"
Move parse_pins in RPC module
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
emilmont | 62:7e6c9f46b3bd | 1 | /**************************************************************************** |
emilmont | 62:7e6c9f46b3bd | 2 | * $Id:: LPC8xx.h 6437 2012-10-31 11:06:06Z dep00694 $ |
emilmont | 62:7e6c9f46b3bd | 3 | * Project: NXP LPC8xx software example |
emilmont | 62:7e6c9f46b3bd | 4 | * |
emilmont | 62:7e6c9f46b3bd | 5 | * Description: |
emilmont | 62:7e6c9f46b3bd | 6 | * CMSIS Cortex-M0+ Core Peripheral Access Layer Header File for |
emilmont | 62:7e6c9f46b3bd | 7 | * NXP LPC800 Device Series |
emilmont | 62:7e6c9f46b3bd | 8 | * |
emilmont | 62:7e6c9f46b3bd | 9 | **************************************************************************** |
emilmont | 62:7e6c9f46b3bd | 10 | * Software that is described herein is for illustrative purposes only |
emilmont | 62:7e6c9f46b3bd | 11 | * which provides customers with programming information regarding the |
emilmont | 62:7e6c9f46b3bd | 12 | * products. This software is supplied "AS IS" without any warranties. |
emilmont | 62:7e6c9f46b3bd | 13 | * NXP Semiconductors assumes no responsibility or liability for the |
emilmont | 62:7e6c9f46b3bd | 14 | * use of the software, conveys no license or title under any patent, |
emilmont | 62:7e6c9f46b3bd | 15 | * copyright, or mask work right to the product. NXP Semiconductors |
emilmont | 62:7e6c9f46b3bd | 16 | * reserves the right to make changes in the software without |
emilmont | 62:7e6c9f46b3bd | 17 | * notification. NXP Semiconductors also make no representation or |
emilmont | 62:7e6c9f46b3bd | 18 | * warranty that such application will be suitable for the specified |
emilmont | 62:7e6c9f46b3bd | 19 | * use without further testing or modification. |
emilmont | 62:7e6c9f46b3bd | 20 | |
emilmont | 62:7e6c9f46b3bd | 21 | * Permission to use, copy, modify, and distribute this software and its |
emilmont | 62:7e6c9f46b3bd | 22 | * documentation is hereby granted, under NXP Semiconductors' |
emilmont | 62:7e6c9f46b3bd | 23 | * relevant copyright in the software, without fee, provided that it |
emilmont | 62:7e6c9f46b3bd | 24 | * is used in conjunction with NXP Semiconductors microcontrollers. This |
emilmont | 62:7e6c9f46b3bd | 25 | * copyright, permission, and disclaimer notice must appear in all copies of |
emilmont | 62:7e6c9f46b3bd | 26 | * this code. |
emilmont | 62:7e6c9f46b3bd | 27 | ****************************************************************************/ |
emilmont | 62:7e6c9f46b3bd | 28 | #ifndef __LPC8xx_H__ |
emilmont | 62:7e6c9f46b3bd | 29 | #define __LPC8xx_H__ |
emilmont | 62:7e6c9f46b3bd | 30 | |
emilmont | 62:7e6c9f46b3bd | 31 | #ifdef __cplusplus |
emilmont | 62:7e6c9f46b3bd | 32 | extern "C" { |
emilmont | 62:7e6c9f46b3bd | 33 | #endif |
emilmont | 62:7e6c9f46b3bd | 34 | |
emilmont | 62:7e6c9f46b3bd | 35 | /** @addtogroup LPC8xx_Definitions LPC8xx Definitions |
emilmont | 62:7e6c9f46b3bd | 36 | This file defines all structures and symbols for LPC8xx: |
emilmont | 62:7e6c9f46b3bd | 37 | - Registers and bitfields |
emilmont | 62:7e6c9f46b3bd | 38 | - peripheral base address |
emilmont | 62:7e6c9f46b3bd | 39 | - PIO definitions |
emilmont | 62:7e6c9f46b3bd | 40 | @{ |
emilmont | 62:7e6c9f46b3bd | 41 | */ |
emilmont | 62:7e6c9f46b3bd | 42 | |
emilmont | 62:7e6c9f46b3bd | 43 | |
emilmont | 62:7e6c9f46b3bd | 44 | /******************************************************************************/ |
emilmont | 62:7e6c9f46b3bd | 45 | /* Processor and Core Peripherals */ |
emilmont | 62:7e6c9f46b3bd | 46 | /******************************************************************************/ |
emilmont | 62:7e6c9f46b3bd | 47 | /** @addtogroup LPC8xx_CMSIS LPC8xx CMSIS Definitions |
emilmont | 62:7e6c9f46b3bd | 48 | Configuration of the Cortex-M0+ Processor and Core Peripherals |
emilmont | 62:7e6c9f46b3bd | 49 | @{ |
emilmont | 62:7e6c9f46b3bd | 50 | */ |
emilmont | 62:7e6c9f46b3bd | 51 | |
emilmont | 62:7e6c9f46b3bd | 52 | /* |
emilmont | 62:7e6c9f46b3bd | 53 | * ========================================================================== |
emilmont | 62:7e6c9f46b3bd | 54 | * ---------- Interrupt Number Definition ----------------------------------- |
emilmont | 62:7e6c9f46b3bd | 55 | * ========================================================================== |
emilmont | 62:7e6c9f46b3bd | 56 | */ |
emilmont | 62:7e6c9f46b3bd | 57 | typedef enum IRQn |
emilmont | 62:7e6c9f46b3bd | 58 | { |
emilmont | 62:7e6c9f46b3bd | 59 | /****** Cortex-M0 Processor Exceptions Numbers ***************************************************/ |
emilmont | 62:7e6c9f46b3bd | 60 | Reset_IRQn = -15, /*!< 1 Reset Vector, invoked on Power up and warm reset*/ |
emilmont | 62:7e6c9f46b3bd | 61 | NonMaskableInt_IRQn = -14, /*!< 2 Non Maskable Interrupt */ |
emilmont | 62:7e6c9f46b3bd | 62 | HardFault_IRQn = -13, /*!< 3 Cortex-M0 Hard Fault Interrupt */ |
emilmont | 62:7e6c9f46b3bd | 63 | SVCall_IRQn = -5, /*!< 11 Cortex-M0 SV Call Interrupt */ |
emilmont | 62:7e6c9f46b3bd | 64 | PendSV_IRQn = -2, /*!< 14 Cortex-M0 Pend SV Interrupt */ |
emilmont | 62:7e6c9f46b3bd | 65 | SysTick_IRQn = -1, /*!< 15 Cortex-M0 System Tick Interrupt */ |
emilmont | 62:7e6c9f46b3bd | 66 | |
emilmont | 62:7e6c9f46b3bd | 67 | /****** LPC8xx Specific Interrupt Numbers ********************************************************/ |
emilmont | 62:7e6c9f46b3bd | 68 | SPI0_IRQn = 0, /*!< SPI0 */ |
emilmont | 62:7e6c9f46b3bd | 69 | SPI1_IRQn = 1, /*!< SPI1 */ |
emilmont | 62:7e6c9f46b3bd | 70 | Reserved0_IRQn = 2, /*!< Reserved Interrupt */ |
emilmont | 62:7e6c9f46b3bd | 71 | UART0_IRQn = 3, /*!< USART0 */ |
emilmont | 62:7e6c9f46b3bd | 72 | UART1_IRQn = 4, /*!< USART1 */ |
emilmont | 62:7e6c9f46b3bd | 73 | UART2_IRQn = 5, /*!< USART2 */ |
emilmont | 62:7e6c9f46b3bd | 74 | Reserved1_IRQn = 6, /*!< Reserved Interrupt */ |
emilmont | 62:7e6c9f46b3bd | 75 | Reserved2_IRQn = 7, /*!< Reserved Interrupt */ |
emilmont | 62:7e6c9f46b3bd | 76 | I2C_IRQn = 8, /*!< I2C */ |
emilmont | 62:7e6c9f46b3bd | 77 | SCT_IRQn = 9, /*!< SCT */ |
emilmont | 62:7e6c9f46b3bd | 78 | MRT_IRQn = 10, /*!< MRT */ |
emilmont | 62:7e6c9f46b3bd | 79 | CMP_IRQn = 11, /*!< CMP */ |
emilmont | 62:7e6c9f46b3bd | 80 | WDT_IRQn = 12, /*!< WDT */ |
emilmont | 62:7e6c9f46b3bd | 81 | BOD_IRQn = 13, /*!< BOD */ |
emilmont | 62:7e6c9f46b3bd | 82 | Reserved3_IRQn = 14, /*!< Reserved Interrupt */ |
emilmont | 62:7e6c9f46b3bd | 83 | WKT_IRQn = 15, /*!< WKT Interrupt */ |
emilmont | 62:7e6c9f46b3bd | 84 | Reserved4_IRQn = 16, /*!< Reserved Interrupt */ |
emilmont | 62:7e6c9f46b3bd | 85 | Reserved5_IRQn = 17, /*!< Reserved Interrupt */ |
emilmont | 62:7e6c9f46b3bd | 86 | Reserved6_IRQn = 18, /*!< Reserved Interrupt */ |
emilmont | 62:7e6c9f46b3bd | 87 | Reserved7_IRQn = 19, /*!< Reserved Interrupt */ |
emilmont | 62:7e6c9f46b3bd | 88 | Reserved8_IRQn = 20, /*!< Reserved Interrupt */ |
emilmont | 62:7e6c9f46b3bd | 89 | Reserved9_IRQn = 21, /*!< Reserved Interrupt */ |
emilmont | 62:7e6c9f46b3bd | 90 | Reserved10_IRQn = 22, /*!< Reserved Interrupt */ |
emilmont | 62:7e6c9f46b3bd | 91 | Reserved11_IRQn = 23, /*!< Reserved Interrupt */ |
emilmont | 62:7e6c9f46b3bd | 92 | PININT0_IRQn = 24, /*!< External Interrupt 0 */ |
emilmont | 62:7e6c9f46b3bd | 93 | PININT1_IRQn = 25, /*!< External Interrupt 1 */ |
emilmont | 62:7e6c9f46b3bd | 94 | PININT2_IRQn = 26, /*!< External Interrupt 2 */ |
emilmont | 62:7e6c9f46b3bd | 95 | PININT3_IRQn = 27, /*!< External Interrupt 3 */ |
emilmont | 62:7e6c9f46b3bd | 96 | PININT4_IRQn = 28, /*!< External Interrupt 4 */ |
emilmont | 62:7e6c9f46b3bd | 97 | PININT5_IRQn = 29, /*!< External Interrupt 5 */ |
emilmont | 62:7e6c9f46b3bd | 98 | PININT6_IRQn = 30, /*!< External Interrupt 6 */ |
emilmont | 62:7e6c9f46b3bd | 99 | PININT7_IRQn = 31, /*!< External Interrupt 7 */ |
emilmont | 62:7e6c9f46b3bd | 100 | } IRQn_Type; |
emilmont | 62:7e6c9f46b3bd | 101 | |
emilmont | 62:7e6c9f46b3bd | 102 | /* |
emilmont | 62:7e6c9f46b3bd | 103 | * ========================================================================== |
emilmont | 62:7e6c9f46b3bd | 104 | * ----------- Processor and Core Peripheral Section ------------------------ |
emilmont | 62:7e6c9f46b3bd | 105 | * ========================================================================== |
emilmont | 62:7e6c9f46b3bd | 106 | */ |
emilmont | 62:7e6c9f46b3bd | 107 | |
emilmont | 62:7e6c9f46b3bd | 108 | /* Configuration of the Cortex-M0+ Processor and Core Peripherals */ |
emilmont | 62:7e6c9f46b3bd | 109 | #define __MPU_PRESENT 0 /*!< MPU present or not */ |
emilmont | 62:7e6c9f46b3bd | 110 | #define __VTOR_PRESENT 1 /**< Defines if an VTOR is present or not */ |
emilmont | 62:7e6c9f46b3bd | 111 | #define __NVIC_PRIO_BITS 2 /*!< Number of Bits used for Priority Levels */ |
emilmont | 62:7e6c9f46b3bd | 112 | #define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */ |
emilmont | 62:7e6c9f46b3bd | 113 | |
emilmont | 62:7e6c9f46b3bd | 114 | /*@}*/ /* end of group LPC8xx_CMSIS */ |
emilmont | 62:7e6c9f46b3bd | 115 | |
emilmont | 62:7e6c9f46b3bd | 116 | |
emilmont | 62:7e6c9f46b3bd | 117 | #include "core_cm0plus.h" /* Cortex-M0+ processor and core peripherals */ |
emilmont | 62:7e6c9f46b3bd | 118 | #include "system_LPC8xx.h" /* System Header */ |
emilmont | 62:7e6c9f46b3bd | 119 | |
emilmont | 62:7e6c9f46b3bd | 120 | |
emilmont | 62:7e6c9f46b3bd | 121 | /******************************************************************************/ |
emilmont | 62:7e6c9f46b3bd | 122 | /* Device Specific Peripheral Registers structures */ |
emilmont | 62:7e6c9f46b3bd | 123 | /******************************************************************************/ |
emilmont | 62:7e6c9f46b3bd | 124 | |
emilmont | 62:7e6c9f46b3bd | 125 | #if defined ( __CC_ARM ) |
emilmont | 62:7e6c9f46b3bd | 126 | #pragma anon_unions |
emilmont | 62:7e6c9f46b3bd | 127 | #endif |
emilmont | 62:7e6c9f46b3bd | 128 | |
emilmont | 62:7e6c9f46b3bd | 129 | /*------------- System Control (SYSCON) --------------------------------------*/ |
emilmont | 62:7e6c9f46b3bd | 130 | /** @addtogroup LPC8xx_SYSCON LPC8xx System Control Block |
emilmont | 62:7e6c9f46b3bd | 131 | @{ |
emilmont | 62:7e6c9f46b3bd | 132 | */ |
emilmont | 62:7e6c9f46b3bd | 133 | typedef struct |
emilmont | 62:7e6c9f46b3bd | 134 | { |
emilmont | 62:7e6c9f46b3bd | 135 | __IO uint32_t SYSMEMREMAP; /*!< Offset: 0x000 System memory remap (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 136 | __IO uint32_t PRESETCTRL; /*!< Offset: 0x004 Peripheral reset control (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 137 | __IO uint32_t SYSPLLCTRL; /*!< Offset: 0x008 System PLL control (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 138 | __IO uint32_t SYSPLLSTAT; /*!< Offset: 0x00C System PLL status (R/W ) */ |
emilmont | 62:7e6c9f46b3bd | 139 | uint32_t RESERVED0[4]; |
emilmont | 62:7e6c9f46b3bd | 140 | |
emilmont | 62:7e6c9f46b3bd | 141 | __IO uint32_t SYSOSCCTRL; /*!< Offset: 0x020 System oscillator control (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 142 | __IO uint32_t WDTOSCCTRL; /*!< Offset: 0x024 Watchdog oscillator control (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 143 | uint32_t RESERVED1[2]; |
emilmont | 62:7e6c9f46b3bd | 144 | __IO uint32_t SYSRSTSTAT; /*!< Offset: 0x030 System reset status Register (R/W ) */ |
emilmont | 62:7e6c9f46b3bd | 145 | uint32_t RESERVED2[3]; |
emilmont | 62:7e6c9f46b3bd | 146 | __IO uint32_t SYSPLLCLKSEL; /*!< Offset: 0x040 System PLL clock source select (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 147 | __IO uint32_t SYSPLLCLKUEN; /*!< Offset: 0x044 System PLL clock source update enable (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 148 | uint32_t RESERVED3[10]; |
emilmont | 62:7e6c9f46b3bd | 149 | |
emilmont | 62:7e6c9f46b3bd | 150 | __IO uint32_t MAINCLKSEL; /*!< Offset: 0x070 Main clock source select (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 151 | __IO uint32_t MAINCLKUEN; /*!< Offset: 0x074 Main clock source update enable (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 152 | __IO uint32_t SYSAHBCLKDIV; /*!< Offset: 0x078 System AHB clock divider (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 153 | uint32_t RESERVED4[1]; |
emilmont | 62:7e6c9f46b3bd | 154 | |
emilmont | 62:7e6c9f46b3bd | 155 | __IO uint32_t SYSAHBCLKCTRL; /*!< Offset: 0x080 System AHB clock control (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 156 | uint32_t RESERVED5[4]; |
emilmont | 62:7e6c9f46b3bd | 157 | __IO uint32_t UARTCLKDIV; /*!< Offset: 0x094 UART clock divider (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 158 | uint32_t RESERVED6[18]; |
emilmont | 62:7e6c9f46b3bd | 159 | |
emilmont | 62:7e6c9f46b3bd | 160 | __IO uint32_t CLKOUTSEL; /*!< Offset: 0x0E0 CLKOUT clock source select (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 161 | __IO uint32_t CLKOUTUEN; /*!< Offset: 0x0E4 CLKOUT clock source update enable (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 162 | __IO uint32_t CLKOUTDIV; /*!< Offset: 0x0E8 CLKOUT clock divider (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 163 | uint32_t RESERVED7; |
emilmont | 62:7e6c9f46b3bd | 164 | __IO uint32_t UARTFRGDIV; /*!< Offset: 0x0F0 UART fractional divider SUB(R/W) */ |
emilmont | 62:7e6c9f46b3bd | 165 | __IO uint32_t UARTFRGMULT; /*!< Offset: 0x0F4 UART fractional divider ADD(R/W) */ |
emilmont | 62:7e6c9f46b3bd | 166 | uint32_t RESERVED8[1]; |
emilmont | 62:7e6c9f46b3bd | 167 | __IO uint32_t EXTTRACECMD; /*!< (@ 0x400480FC) External trace buffer command register */ |
emilmont | 62:7e6c9f46b3bd | 168 | __IO uint32_t PIOPORCAP0; /*!< Offset: 0x100 POR captured PIO status 0 (R/ ) */ |
emilmont | 62:7e6c9f46b3bd | 169 | uint32_t RESERVED9[12]; |
emilmont | 62:7e6c9f46b3bd | 170 | __IO uint32_t IOCONCLKDIV[7]; /*!< (@0x40048134-14C) Peripheral clock x to the IOCON block for programmable glitch filter */ |
emilmont | 62:7e6c9f46b3bd | 171 | __IO uint32_t BODCTRL; /*!< Offset: 0x150 BOD control (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 172 | __IO uint32_t SYSTCKCAL; /*!< Offset: 0x154 System tick counter calibration (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 173 | uint32_t RESERVED10[6]; |
emilmont | 62:7e6c9f46b3bd | 174 | __IO uint32_t IRQLATENCY; /*!< (@ 0x40048170) IRQ delay */ |
emilmont | 62:7e6c9f46b3bd | 175 | __IO uint32_t NMISRC; /*!< (@ 0x40048174) NMI Source Control */ |
emilmont | 62:7e6c9f46b3bd | 176 | __IO uint32_t PINTSEL[8]; /*!< (@ 0x40048178) GPIO Pin Interrupt Select register 0 */ |
emilmont | 62:7e6c9f46b3bd | 177 | uint32_t RESERVED11[27]; |
emilmont | 62:7e6c9f46b3bd | 178 | __IO uint32_t STARTERP0; /*!< Offset: 0x204 Start logic signal enable Register 0 (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 179 | uint32_t RESERVED12[3]; |
emilmont | 62:7e6c9f46b3bd | 180 | __IO uint32_t STARTERP1; /*!< Offset: 0x214 Start logic signal enable Register 0 (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 181 | uint32_t RESERVED13[6]; |
emilmont | 62:7e6c9f46b3bd | 182 | __IO uint32_t PDSLEEPCFG; /*!< Offset: 0x230 Power-down states in Deep-sleep mode (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 183 | __IO uint32_t PDAWAKECFG; /*!< Offset: 0x234 Power-down states after wake-up (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 184 | __IO uint32_t PDRUNCFG; /*!< Offset: 0x238 Power-down configuration Register (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 185 | uint32_t RESERVED14[110]; |
emilmont | 62:7e6c9f46b3bd | 186 | __I uint32_t DEVICE_ID; /*!< Offset: 0x3F4 Device ID (R/ ) */ |
emilmont | 62:7e6c9f46b3bd | 187 | } LPC_SYSCON_TypeDef; |
emilmont | 62:7e6c9f46b3bd | 188 | /*@}*/ /* end of group LPC8xx_SYSCON */ |
emilmont | 62:7e6c9f46b3bd | 189 | |
emilmont | 62:7e6c9f46b3bd | 190 | |
emilmont | 62:7e6c9f46b3bd | 191 | /** |
emilmont | 62:7e6c9f46b3bd | 192 | * @brief Product name title=UM10462 Chapter title=LPC8xx I/O configuration Modification date=3/16/2011 Major revision=0 Minor revision=3 (IOCONFIG) |
emilmont | 62:7e6c9f46b3bd | 193 | */ |
emilmont | 62:7e6c9f46b3bd | 194 | |
emilmont | 62:7e6c9f46b3bd | 195 | typedef struct { /*!< (@ 0x40044000) IOCONFIG Structure */ |
emilmont | 62:7e6c9f46b3bd | 196 | __IO uint32_t PIO0_17; /*!< (@ 0x40044000) I/O configuration for pin PIO0_17 */ |
emilmont | 62:7e6c9f46b3bd | 197 | __IO uint32_t PIO0_13; /*!< (@ 0x40044004) I/O configuration for pin PIO0_13 */ |
emilmont | 62:7e6c9f46b3bd | 198 | __IO uint32_t PIO0_12; /*!< (@ 0x40044008) I/O configuration for pin PIO0_12 */ |
emilmont | 62:7e6c9f46b3bd | 199 | __IO uint32_t PIO0_5; /*!< (@ 0x4004400C) I/O configuration for pin PIO0_5 */ |
emilmont | 62:7e6c9f46b3bd | 200 | __IO uint32_t PIO0_4; /*!< (@ 0x40044010) I/O configuration for pin PIO0_4 */ |
emilmont | 62:7e6c9f46b3bd | 201 | __IO uint32_t PIO0_3; /*!< (@ 0x40044014) I/O configuration for pin PIO0_3 */ |
emilmont | 62:7e6c9f46b3bd | 202 | __IO uint32_t PIO0_2; /*!< (@ 0x40044018) I/O configuration for pin PIO0_2 */ |
emilmont | 62:7e6c9f46b3bd | 203 | __IO uint32_t PIO0_11; /*!< (@ 0x4004401C) I/O configuration for pin PIO0_11 */ |
emilmont | 62:7e6c9f46b3bd | 204 | __IO uint32_t PIO0_10; /*!< (@ 0x40044020) I/O configuration for pin PIO0_10 */ |
emilmont | 62:7e6c9f46b3bd | 205 | __IO uint32_t PIO0_16; /*!< (@ 0x40044024) I/O configuration for pin PIO0_16 */ |
emilmont | 62:7e6c9f46b3bd | 206 | __IO uint32_t PIO0_15; /*!< (@ 0x40044028) I/O configuration for pin PIO0_15 */ |
emilmont | 62:7e6c9f46b3bd | 207 | __IO uint32_t PIO0_1; /*!< (@ 0x4004402C) I/O configuration for pin PIO0_1 */ |
emilmont | 62:7e6c9f46b3bd | 208 | __IO uint32_t Reserved; /*!< (@ 0x40044030) I/O configuration for pin (Reserved) */ |
emilmont | 62:7e6c9f46b3bd | 209 | __IO uint32_t PIO0_9; /*!< (@ 0x40044034) I/O configuration for pin PIO0_9 */ |
emilmont | 62:7e6c9f46b3bd | 210 | __IO uint32_t PIO0_8; /*!< (@ 0x40044038) I/O configuration for pin PIO0_8 */ |
emilmont | 62:7e6c9f46b3bd | 211 | __IO uint32_t PIO0_7; /*!< (@ 0x4004403C) I/O configuration for pin PIO0_7 */ |
emilmont | 62:7e6c9f46b3bd | 212 | __IO uint32_t PIO0_6; /*!< (@ 0x40044040) I/O configuration for pin PIO0_6 */ |
emilmont | 62:7e6c9f46b3bd | 213 | __IO uint32_t PIO0_0; /*!< (@ 0x40044044) I/O configuration for pin PIO0_0 */ |
emilmont | 62:7e6c9f46b3bd | 214 | __IO uint32_t PIO0_14; /*!< (@ 0x40044048) I/O configuration for pin PIO0_14 */ |
emilmont | 62:7e6c9f46b3bd | 215 | } LPC_IOCON_TypeDef; |
emilmont | 62:7e6c9f46b3bd | 216 | /*@}*/ /* end of group LPC8xx_IOCON */ |
emilmont | 62:7e6c9f46b3bd | 217 | |
emilmont | 62:7e6c9f46b3bd | 218 | /** |
emilmont | 62:7e6c9f46b3bd | 219 | * @brief Product name title=UM10462 Chapter title=LPC8xx Flash programming firmware Major revision=0 Minor revision=3 (FLASHCTRL) |
emilmont | 62:7e6c9f46b3bd | 220 | */ |
emilmont | 62:7e6c9f46b3bd | 221 | typedef struct { /*!< (@ 0x40040000) FLASHCTRL Structure */ |
emilmont | 62:7e6c9f46b3bd | 222 | __I uint32_t RESERVED0[4]; |
emilmont | 62:7e6c9f46b3bd | 223 | __IO uint32_t FLASHCFG; /*!< (@ 0x40040010) Flash configuration register */ |
emilmont | 62:7e6c9f46b3bd | 224 | __I uint32_t RESERVED1[3]; |
emilmont | 62:7e6c9f46b3bd | 225 | __IO uint32_t FMSSTART; /*!< (@ 0x40040020) Signature start address register */ |
emilmont | 62:7e6c9f46b3bd | 226 | __IO uint32_t FMSSTOP; /*!< (@ 0x40040024) Signature stop-address register */ |
emilmont | 62:7e6c9f46b3bd | 227 | __I uint32_t RESERVED2; |
emilmont | 62:7e6c9f46b3bd | 228 | __I uint32_t FMSW0; |
emilmont | 62:7e6c9f46b3bd | 229 | } LPC_FLASHCTRL_TypeDef; |
emilmont | 62:7e6c9f46b3bd | 230 | /*@}*/ /* end of group LPC8xx_FLASHCTRL */ |
emilmont | 62:7e6c9f46b3bd | 231 | |
emilmont | 62:7e6c9f46b3bd | 232 | |
emilmont | 62:7e6c9f46b3bd | 233 | /*------------- Power Management Unit (PMU) --------------------------*/ |
emilmont | 62:7e6c9f46b3bd | 234 | /** @addtogroup LPC8xx_PMU LPC8xx Power Management Unit |
emilmont | 62:7e6c9f46b3bd | 235 | @{ |
emilmont | 62:7e6c9f46b3bd | 236 | */ |
emilmont | 62:7e6c9f46b3bd | 237 | typedef struct |
emilmont | 62:7e6c9f46b3bd | 238 | { |
emilmont | 62:7e6c9f46b3bd | 239 | __IO uint32_t PCON; /*!< Offset: 0x000 Power control Register (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 240 | __IO uint32_t GPREG0; /*!< Offset: 0x004 General purpose Register 0 (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 241 | __IO uint32_t GPREG1; /*!< Offset: 0x008 General purpose Register 1 (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 242 | __IO uint32_t GPREG2; /*!< Offset: 0x00C General purpose Register 2 (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 243 | __IO uint32_t GPREG3; /*!< Offset: 0x010 General purpose Register 3 (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 244 | __IO uint32_t DPDCTRL; /*!< Offset: 0x014 Deep power-down control register (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 245 | } LPC_PMU_TypeDef; |
emilmont | 62:7e6c9f46b3bd | 246 | /*@}*/ /* end of group LPC8xx_PMU */ |
emilmont | 62:7e6c9f46b3bd | 247 | |
emilmont | 62:7e6c9f46b3bd | 248 | |
emilmont | 62:7e6c9f46b3bd | 249 | /*------------- Switch Matrix Port --------------------------*/ |
emilmont | 62:7e6c9f46b3bd | 250 | /** @addtogroup LPC8xx_SWM LPC8xx Switch Matrix Port |
emilmont | 62:7e6c9f46b3bd | 251 | @{ |
emilmont | 62:7e6c9f46b3bd | 252 | */ |
emilmont | 62:7e6c9f46b3bd | 253 | typedef struct |
emilmont | 62:7e6c9f46b3bd | 254 | { |
emilmont | 62:7e6c9f46b3bd | 255 | union { |
emilmont | 62:7e6c9f46b3bd | 256 | __IO uint32_t PINASSIGN[9]; |
emilmont | 62:7e6c9f46b3bd | 257 | struct { |
emilmont | 62:7e6c9f46b3bd | 258 | __IO uint32_t PINASSIGN0; |
emilmont | 62:7e6c9f46b3bd | 259 | __IO uint32_t PINASSIGN1; |
emilmont | 62:7e6c9f46b3bd | 260 | __IO uint32_t PINASSIGN2; |
emilmont | 62:7e6c9f46b3bd | 261 | __IO uint32_t PINASSIGN3; |
emilmont | 62:7e6c9f46b3bd | 262 | __IO uint32_t PINASSIGN4; |
emilmont | 62:7e6c9f46b3bd | 263 | __IO uint32_t PINASSIGN5; |
emilmont | 62:7e6c9f46b3bd | 264 | __IO uint32_t PINASSIGN6; |
emilmont | 62:7e6c9f46b3bd | 265 | __IO uint32_t PINASSIGN7; |
emilmont | 62:7e6c9f46b3bd | 266 | __IO uint32_t PINASSIGN8; |
emilmont | 62:7e6c9f46b3bd | 267 | }; |
emilmont | 62:7e6c9f46b3bd | 268 | }; |
emilmont | 62:7e6c9f46b3bd | 269 | __I uint32_t RESERVED0[103]; |
emilmont | 62:7e6c9f46b3bd | 270 | __IO uint32_t PINENABLE0; |
emilmont | 62:7e6c9f46b3bd | 271 | } LPC_SWM_TypeDef; |
emilmont | 62:7e6c9f46b3bd | 272 | /*@}*/ /* end of group LPC8xx_SWM */ |
emilmont | 62:7e6c9f46b3bd | 273 | |
emilmont | 62:7e6c9f46b3bd | 274 | |
emilmont | 62:7e6c9f46b3bd | 275 | // ------------------------------------------------------------------------------------------------ |
emilmont | 62:7e6c9f46b3bd | 276 | // ----- GPIO_PORT ----- |
emilmont | 62:7e6c9f46b3bd | 277 | // ------------------------------------------------------------------------------------------------ |
emilmont | 62:7e6c9f46b3bd | 278 | |
emilmont | 62:7e6c9f46b3bd | 279 | /** |
emilmont | 62:7e6c9f46b3bd | 280 | * @brief Product name title=UM10462 Chapter title=LPC8xx GPIO Modification date=3/17/2011 Major revision=0 Minor revision=3 (GPIO_PORT) |
emilmont | 62:7e6c9f46b3bd | 281 | */ |
emilmont | 62:7e6c9f46b3bd | 282 | |
emilmont | 62:7e6c9f46b3bd | 283 | typedef struct { |
emilmont | 62:7e6c9f46b3bd | 284 | __IO uint8_t B0[18]; /*!< (@ 0xA0000000) Byte pin registers port 0 */ |
emilmont | 62:7e6c9f46b3bd | 285 | __I uint16_t RESERVED0[2039]; |
emilmont | 62:7e6c9f46b3bd | 286 | __IO uint32_t W0[18]; /*!< (@ 0xA0001000) Word pin registers port 0 */ |
emilmont | 62:7e6c9f46b3bd | 287 | uint32_t RESERVED1[1006]; |
emilmont | 62:7e6c9f46b3bd | 288 | __IO uint32_t DIR0; /* 0x2000 */ |
emilmont | 62:7e6c9f46b3bd | 289 | uint32_t RESERVED2[31]; |
emilmont | 62:7e6c9f46b3bd | 290 | __IO uint32_t MASK0; /* 0x2080 */ |
emilmont | 62:7e6c9f46b3bd | 291 | uint32_t RESERVED3[31]; |
emilmont | 62:7e6c9f46b3bd | 292 | __IO uint32_t PIN0; /* 0x2100 */ |
emilmont | 62:7e6c9f46b3bd | 293 | uint32_t RESERVED4[31]; |
emilmont | 62:7e6c9f46b3bd | 294 | __IO uint32_t MPIN0; /* 0x2180 */ |
emilmont | 62:7e6c9f46b3bd | 295 | uint32_t RESERVED5[31]; |
emilmont | 62:7e6c9f46b3bd | 296 | __IO uint32_t SET0; /* 0x2200 */ |
emilmont | 62:7e6c9f46b3bd | 297 | uint32_t RESERVED6[31]; |
emilmont | 62:7e6c9f46b3bd | 298 | __O uint32_t CLR0; /* 0x2280 */ |
emilmont | 62:7e6c9f46b3bd | 299 | uint32_t RESERVED7[31]; |
emilmont | 62:7e6c9f46b3bd | 300 | __O uint32_t NOT0; /* 0x2300 */ |
emilmont | 62:7e6c9f46b3bd | 301 | |
emilmont | 62:7e6c9f46b3bd | 302 | } LPC_GPIO_PORT_TypeDef; |
emilmont | 62:7e6c9f46b3bd | 303 | |
emilmont | 62:7e6c9f46b3bd | 304 | |
emilmont | 62:7e6c9f46b3bd | 305 | // ------------------------------------------------------------------------------------------------ |
emilmont | 62:7e6c9f46b3bd | 306 | // ----- PIN_INT ----- |
emilmont | 62:7e6c9f46b3bd | 307 | // ------------------------------------------------------------------------------------------------ |
emilmont | 62:7e6c9f46b3bd | 308 | |
emilmont | 62:7e6c9f46b3bd | 309 | /** |
emilmont | 62:7e6c9f46b3bd | 310 | * @brief Product name title=UM10462 Chapter title=LPC8xx GPIO Modification date=3/17/2011 Major revision=0 Minor revision=3 (PIN_INT) |
emilmont | 62:7e6c9f46b3bd | 311 | */ |
emilmont | 62:7e6c9f46b3bd | 312 | |
emilmont | 62:7e6c9f46b3bd | 313 | typedef struct { /*!< (@ 0xA0004000) PIN_INT Structure */ |
emilmont | 62:7e6c9f46b3bd | 314 | __IO uint32_t ISEL; /*!< (@ 0xA0004000) Pin Interrupt Mode register */ |
emilmont | 62:7e6c9f46b3bd | 315 | __IO uint32_t IENR; /*!< (@ 0xA0004004) Pin Interrupt Enable (Rising) register */ |
emilmont | 62:7e6c9f46b3bd | 316 | __IO uint32_t SIENR; /*!< (@ 0xA0004008) Set Pin Interrupt Enable (Rising) register */ |
emilmont | 62:7e6c9f46b3bd | 317 | __IO uint32_t CIENR; /*!< (@ 0xA000400C) Clear Pin Interrupt Enable (Rising) register */ |
emilmont | 62:7e6c9f46b3bd | 318 | __IO uint32_t IENF; /*!< (@ 0xA0004010) Pin Interrupt Enable Falling Edge / Active Level register */ |
emilmont | 62:7e6c9f46b3bd | 319 | __IO uint32_t SIENF; /*!< (@ 0xA0004014) Set Pin Interrupt Enable Falling Edge / Active Level register */ |
emilmont | 62:7e6c9f46b3bd | 320 | __IO uint32_t CIENF; /*!< (@ 0xA0004018) Clear Pin Interrupt Enable Falling Edge / Active Level address */ |
emilmont | 62:7e6c9f46b3bd | 321 | __IO uint32_t RISE; /*!< (@ 0xA000401C) Pin Interrupt Rising Edge register */ |
emilmont | 62:7e6c9f46b3bd | 322 | __IO uint32_t FALL; /*!< (@ 0xA0004020) Pin Interrupt Falling Edge register */ |
emilmont | 62:7e6c9f46b3bd | 323 | __IO uint32_t IST; /*!< (@ 0xA0004024) Pin Interrupt Status register */ |
emilmont | 62:7e6c9f46b3bd | 324 | __IO uint32_t PMCTRL; /*!< (@ 0xA0004028) GPIO pattern match interrupt control register */ |
emilmont | 62:7e6c9f46b3bd | 325 | __IO uint32_t PMSRC; /*!< (@ 0xA000402C) GPIO pattern match interrupt bit-slice source register */ |
emilmont | 62:7e6c9f46b3bd | 326 | __IO uint32_t PMCFG; /*!< (@ 0xA0004030) GPIO pattern match interrupt bit slice configuration register */ |
emilmont | 62:7e6c9f46b3bd | 327 | } LPC_PIN_INT_TypeDef; |
emilmont | 62:7e6c9f46b3bd | 328 | |
emilmont | 62:7e6c9f46b3bd | 329 | |
emilmont | 62:7e6c9f46b3bd | 330 | /*------------- CRC Engine (CRC) -----------------------------------------*/ |
emilmont | 62:7e6c9f46b3bd | 331 | /** @addtogroup LPC8xx_CRC |
emilmont | 62:7e6c9f46b3bd | 332 | @{ |
emilmont | 62:7e6c9f46b3bd | 333 | */ |
emilmont | 62:7e6c9f46b3bd | 334 | typedef struct |
emilmont | 62:7e6c9f46b3bd | 335 | { |
emilmont | 62:7e6c9f46b3bd | 336 | __IO uint32_t MODE; |
emilmont | 62:7e6c9f46b3bd | 337 | __IO uint32_t SEED; |
emilmont | 62:7e6c9f46b3bd | 338 | union { |
emilmont | 62:7e6c9f46b3bd | 339 | __I uint32_t SUM; |
emilmont | 62:7e6c9f46b3bd | 340 | __O uint32_t WR_DATA_DWORD; |
emilmont | 62:7e6c9f46b3bd | 341 | __O uint16_t WR_DATA_WORD; |
emilmont | 62:7e6c9f46b3bd | 342 | uint16_t RESERVED_WORD; |
emilmont | 62:7e6c9f46b3bd | 343 | __O uint8_t WR_DATA_BYTE; |
emilmont | 62:7e6c9f46b3bd | 344 | uint8_t RESERVED_BYTE[3]; |
emilmont | 62:7e6c9f46b3bd | 345 | }; |
emilmont | 62:7e6c9f46b3bd | 346 | } LPC_CRC_TypeDef; |
emilmont | 62:7e6c9f46b3bd | 347 | /*@}*/ /* end of group LPC8xx_CRC */ |
emilmont | 62:7e6c9f46b3bd | 348 | |
emilmont | 62:7e6c9f46b3bd | 349 | /*------------- Comparator (CMP) --------------------------------------------------*/ |
emilmont | 62:7e6c9f46b3bd | 350 | /** @addtogroup LPC8xx_CMP LPC8xx Comparator |
emilmont | 62:7e6c9f46b3bd | 351 | @{ |
emilmont | 62:7e6c9f46b3bd | 352 | */ |
emilmont | 62:7e6c9f46b3bd | 353 | typedef struct { /*!< (@ 0x40024000) CMP Structure */ |
emilmont | 62:7e6c9f46b3bd | 354 | __IO uint32_t CTRL; /*!< (@ 0x40024000) Comparator control register */ |
emilmont | 62:7e6c9f46b3bd | 355 | __IO uint32_t LAD; /*!< (@ 0x40024004) Voltage ladder register */ |
emilmont | 62:7e6c9f46b3bd | 356 | } LPC_CMP_TypeDef; |
emilmont | 62:7e6c9f46b3bd | 357 | /*@}*/ /* end of group LPC8xx_CMP */ |
emilmont | 62:7e6c9f46b3bd | 358 | |
emilmont | 62:7e6c9f46b3bd | 359 | |
emilmont | 62:7e6c9f46b3bd | 360 | /*------------- Wakeup Timer (WKT) --------------------------------------------------*/ |
emilmont | 62:7e6c9f46b3bd | 361 | /** @addtogroup LPC8xx_WKT |
emilmont | 62:7e6c9f46b3bd | 362 | @{ |
emilmont | 62:7e6c9f46b3bd | 363 | */ |
emilmont | 62:7e6c9f46b3bd | 364 | typedef struct { /*!< (@ 0x40028000) WKT Structure */ |
emilmont | 62:7e6c9f46b3bd | 365 | __IO uint32_t CTRL; /*!< (@ 0x40028000) Alarm/Wakeup Timer Control register */ |
emilmont | 62:7e6c9f46b3bd | 366 | uint32_t Reserved[2]; |
emilmont | 62:7e6c9f46b3bd | 367 | __IO uint32_t COUNT; /*!< (@ 0x4002800C) Alarm/Wakeup TImer counter register */ |
emilmont | 62:7e6c9f46b3bd | 368 | } LPC_WKT_TypeDef; |
emilmont | 62:7e6c9f46b3bd | 369 | /*@}*/ /* end of group LPC8xx_WKT */ |
emilmont | 62:7e6c9f46b3bd | 370 | |
emilmont | 62:7e6c9f46b3bd | 371 | |
emilmont | 62:7e6c9f46b3bd | 372 | /*------------- Multi-Rate Timer(MRT) --------------------------------------------------*/ |
emilmont | 62:7e6c9f46b3bd | 373 | typedef struct { |
emilmont | 62:7e6c9f46b3bd | 374 | __IO uint32_t INTVAL; |
emilmont | 62:7e6c9f46b3bd | 375 | __IO uint32_t TIMER; |
emilmont | 62:7e6c9f46b3bd | 376 | __IO uint32_t CTRL; |
emilmont | 62:7e6c9f46b3bd | 377 | __IO uint32_t STAT; |
emilmont | 62:7e6c9f46b3bd | 378 | } MRT_Channel_cfg_Type; |
emilmont | 62:7e6c9f46b3bd | 379 | |
emilmont | 62:7e6c9f46b3bd | 380 | typedef struct { |
emilmont | 62:7e6c9f46b3bd | 381 | MRT_Channel_cfg_Type Channel[4]; |
emilmont | 62:7e6c9f46b3bd | 382 | uint32_t Reserved0[1]; |
emilmont | 62:7e6c9f46b3bd | 383 | __IO uint32_t IDLE_CH; |
emilmont | 62:7e6c9f46b3bd | 384 | __IO uint32_t IRQ_FLAG; |
emilmont | 62:7e6c9f46b3bd | 385 | } LPC_MRT_TypeDef; |
emilmont | 62:7e6c9f46b3bd | 386 | |
emilmont | 62:7e6c9f46b3bd | 387 | |
emilmont | 62:7e6c9f46b3bd | 388 | /*------------- Universal Asynchronous Receiver Transmitter (USART) -----------*/ |
emilmont | 62:7e6c9f46b3bd | 389 | /** @addtogroup LPC8xx_UART LPC8xx Universal Asynchronous Receiver/Transmitter |
emilmont | 62:7e6c9f46b3bd | 390 | @{ |
emilmont | 62:7e6c9f46b3bd | 391 | */ |
emilmont | 62:7e6c9f46b3bd | 392 | /** |
emilmont | 62:7e6c9f46b3bd | 393 | * @brief Product name title=LPC8xx MCU Chapter title=USART Modification date=4/18/2012 Major revision=0 Minor revision=9 (USART) |
emilmont | 62:7e6c9f46b3bd | 394 | */ |
emilmont | 62:7e6c9f46b3bd | 395 | typedef struct |
emilmont | 62:7e6c9f46b3bd | 396 | { |
emilmont | 62:7e6c9f46b3bd | 397 | __IO uint32_t CFG; /* 0x00 */ |
emilmont | 62:7e6c9f46b3bd | 398 | __IO uint32_t CTRL; |
emilmont | 62:7e6c9f46b3bd | 399 | __IO uint32_t STAT; |
emilmont | 62:7e6c9f46b3bd | 400 | __IO uint32_t INTENSET; |
emilmont | 62:7e6c9f46b3bd | 401 | __O uint32_t INTENCLR; /* 0x10 */ |
emilmont | 62:7e6c9f46b3bd | 402 | __I uint32_t RXDATA; |
emilmont | 62:7e6c9f46b3bd | 403 | __I uint32_t RXDATA_STAT; |
emilmont | 62:7e6c9f46b3bd | 404 | __IO uint32_t TXDATA; |
emilmont | 62:7e6c9f46b3bd | 405 | __IO uint32_t BRG; /* 0x20 */ |
emilmont | 62:7e6c9f46b3bd | 406 | __IO uint32_t INTSTAT; |
emilmont | 62:7e6c9f46b3bd | 407 | } LPC_USART_TypeDef; |
emilmont | 62:7e6c9f46b3bd | 408 | |
emilmont | 62:7e6c9f46b3bd | 409 | /*@}*/ /* end of group LPC8xx_USART */ |
emilmont | 62:7e6c9f46b3bd | 410 | |
emilmont | 62:7e6c9f46b3bd | 411 | |
emilmont | 62:7e6c9f46b3bd | 412 | /*------------- Synchronous Serial Interface Controller (SPI) -----------------------*/ |
emilmont | 62:7e6c9f46b3bd | 413 | /** @addtogroup LPC8xx_SPI LPC8xx Synchronous Serial Port |
emilmont | 62:7e6c9f46b3bd | 414 | @{ |
emilmont | 62:7e6c9f46b3bd | 415 | */ |
emilmont | 62:7e6c9f46b3bd | 416 | typedef struct |
emilmont | 62:7e6c9f46b3bd | 417 | { |
emilmont | 62:7e6c9f46b3bd | 418 | __IO uint32_t CFG; /* 0x00 */ |
emilmont | 62:7e6c9f46b3bd | 419 | __IO uint32_t DLY; |
emilmont | 62:7e6c9f46b3bd | 420 | __IO uint32_t STAT; |
emilmont | 62:7e6c9f46b3bd | 421 | __IO uint32_t INTENSET; |
emilmont | 62:7e6c9f46b3bd | 422 | __O uint32_t INTENCLR; /* 0x10 */ |
emilmont | 62:7e6c9f46b3bd | 423 | __I uint32_t RXDAT; |
emilmont | 62:7e6c9f46b3bd | 424 | __IO uint32_t TXDATCTL; |
emilmont | 62:7e6c9f46b3bd | 425 | __IO uint32_t TXDAT; |
emilmont | 62:7e6c9f46b3bd | 426 | __IO uint32_t TXCTRL; /* 0x20 */ |
emilmont | 62:7e6c9f46b3bd | 427 | __IO uint32_t DIV; |
emilmont | 62:7e6c9f46b3bd | 428 | __I uint32_t INTSTAT; |
emilmont | 62:7e6c9f46b3bd | 429 | } LPC_SPI_TypeDef; |
emilmont | 62:7e6c9f46b3bd | 430 | /*@}*/ /* end of group LPC8xx_SPI */ |
emilmont | 62:7e6c9f46b3bd | 431 | |
emilmont | 62:7e6c9f46b3bd | 432 | |
emilmont | 62:7e6c9f46b3bd | 433 | /*------------- Inter-Integrated Circuit (I2C) -------------------------------*/ |
emilmont | 62:7e6c9f46b3bd | 434 | /** @addtogroup LPC8xx_I2C I2C-Bus Interface |
emilmont | 62:7e6c9f46b3bd | 435 | @{ |
emilmont | 62:7e6c9f46b3bd | 436 | */ |
emilmont | 62:7e6c9f46b3bd | 437 | typedef struct |
emilmont | 62:7e6c9f46b3bd | 438 | { |
emilmont | 62:7e6c9f46b3bd | 439 | __IO uint32_t CFG; /* 0x00 */ |
emilmont | 62:7e6c9f46b3bd | 440 | __IO uint32_t STAT; |
emilmont | 62:7e6c9f46b3bd | 441 | __IO uint32_t INTENSET; |
emilmont | 62:7e6c9f46b3bd | 442 | __O uint32_t INTENCLR; |
emilmont | 62:7e6c9f46b3bd | 443 | __IO uint32_t TIMEOUT; /* 0x10 */ |
emilmont | 62:7e6c9f46b3bd | 444 | __IO uint32_t DIV; |
emilmont | 62:7e6c9f46b3bd | 445 | __IO uint32_t INTSTAT; |
emilmont | 62:7e6c9f46b3bd | 446 | uint32_t Reserved0[1]; |
emilmont | 62:7e6c9f46b3bd | 447 | __IO uint32_t MSTCTL; /* 0x20 */ |
emilmont | 62:7e6c9f46b3bd | 448 | __IO uint32_t MSTTIME; |
emilmont | 62:7e6c9f46b3bd | 449 | __IO uint32_t MSTDAT; |
emilmont | 62:7e6c9f46b3bd | 450 | uint32_t Reserved1[5]; |
emilmont | 62:7e6c9f46b3bd | 451 | __IO uint32_t SLVCTL; /* 0x40 */ |
emilmont | 62:7e6c9f46b3bd | 452 | __IO uint32_t SLVDAT; |
emilmont | 62:7e6c9f46b3bd | 453 | __IO uint32_t SLVADR0; |
emilmont | 62:7e6c9f46b3bd | 454 | __IO uint32_t SLVADR1; |
emilmont | 62:7e6c9f46b3bd | 455 | __IO uint32_t SLVADR2; /* 0x50 */ |
emilmont | 62:7e6c9f46b3bd | 456 | __IO uint32_t SLVADR3; |
emilmont | 62:7e6c9f46b3bd | 457 | __IO uint32_t SLVQUAL0; |
emilmont | 62:7e6c9f46b3bd | 458 | uint32_t Reserved2[9]; |
emilmont | 62:7e6c9f46b3bd | 459 | __I uint32_t MONRXDAT; /* 0x80 */ |
emilmont | 62:7e6c9f46b3bd | 460 | } LPC_I2C_TypeDef; |
emilmont | 62:7e6c9f46b3bd | 461 | |
emilmont | 62:7e6c9f46b3bd | 462 | /*@}*/ /* end of group LPC8xx_I2C */ |
emilmont | 62:7e6c9f46b3bd | 463 | |
emilmont | 62:7e6c9f46b3bd | 464 | /** |
emilmont | 62:7e6c9f46b3bd | 465 | * @brief State Configurable Timer (SCT) (SCT) |
emilmont | 62:7e6c9f46b3bd | 466 | */ |
emilmont | 62:7e6c9f46b3bd | 467 | |
emilmont | 62:7e6c9f46b3bd | 468 | /** |
emilmont | 62:7e6c9f46b3bd | 469 | * @brief Product name title=UM10430 Chapter title=LPC8xx State Configurable Timer (SCT) Modification date=1/18/2011 Major revision=0 Minor revision=7 (SCT) |
emilmont | 62:7e6c9f46b3bd | 470 | */ |
emilmont | 62:7e6c9f46b3bd | 471 | |
emilmont | 62:7e6c9f46b3bd | 472 | #define CONFIG_SCT_nEV (6) /* Number of events */ |
emilmont | 62:7e6c9f46b3bd | 473 | #define CONFIG_SCT_nRG (5) /* Number of match/compare registers */ |
emilmont | 62:7e6c9f46b3bd | 474 | #define CONFIG_SCT_nOU (4) /* Number of outputs */ |
emilmont | 62:7e6c9f46b3bd | 475 | |
emilmont | 62:7e6c9f46b3bd | 476 | typedef struct |
emilmont | 62:7e6c9f46b3bd | 477 | { |
emilmont | 62:7e6c9f46b3bd | 478 | __IO uint32_t CONFIG; /* 0x000 Configuration Register */ |
emilmont | 62:7e6c9f46b3bd | 479 | union { |
emilmont | 62:7e6c9f46b3bd | 480 | __IO uint32_t CTRL_U; /* 0x004 Control Register */ |
emilmont | 62:7e6c9f46b3bd | 481 | struct { |
emilmont | 62:7e6c9f46b3bd | 482 | __IO uint16_t CTRL_L; /* 0x004 low control register */ |
emilmont | 62:7e6c9f46b3bd | 483 | __IO uint16_t CTRL_H; /* 0x006 high control register */ |
emilmont | 62:7e6c9f46b3bd | 484 | }; |
emilmont | 62:7e6c9f46b3bd | 485 | }; |
emilmont | 62:7e6c9f46b3bd | 486 | __IO uint16_t LIMIT_L; /* 0x008 limit register for counter L */ |
emilmont | 62:7e6c9f46b3bd | 487 | __IO uint16_t LIMIT_H; /* 0x00A limit register for counter H */ |
emilmont | 62:7e6c9f46b3bd | 488 | __IO uint16_t HALT_L; /* 0x00C halt register for counter L */ |
emilmont | 62:7e6c9f46b3bd | 489 | __IO uint16_t HALT_H; /* 0x00E halt register for counter H */ |
emilmont | 62:7e6c9f46b3bd | 490 | __IO uint16_t STOP_L; /* 0x010 stop register for counter L */ |
emilmont | 62:7e6c9f46b3bd | 491 | __IO uint16_t STOP_H; /* 0x012 stop register for counter H */ |
emilmont | 62:7e6c9f46b3bd | 492 | __IO uint16_t START_L; /* 0x014 start register for counter L */ |
emilmont | 62:7e6c9f46b3bd | 493 | __IO uint16_t START_H; /* 0x016 start register for counter H */ |
emilmont | 62:7e6c9f46b3bd | 494 | uint32_t RESERVED1[10]; /* 0x018-0x03C reserved */ |
emilmont | 62:7e6c9f46b3bd | 495 | union { |
emilmont | 62:7e6c9f46b3bd | 496 | __IO uint32_t COUNT_U; /* 0x040 counter register */ |
emilmont | 62:7e6c9f46b3bd | 497 | struct { |
emilmont | 62:7e6c9f46b3bd | 498 | __IO uint16_t COUNT_L; /* 0x040 counter register for counter L */ |
emilmont | 62:7e6c9f46b3bd | 499 | __IO uint16_t COUNT_H; /* 0x042 counter register for counter H */ |
emilmont | 62:7e6c9f46b3bd | 500 | }; |
emilmont | 62:7e6c9f46b3bd | 501 | }; |
emilmont | 62:7e6c9f46b3bd | 502 | __IO uint16_t STATE_L; /* 0x044 state register for counter L */ |
emilmont | 62:7e6c9f46b3bd | 503 | __IO uint16_t STATE_H; /* 0x046 state register for counter H */ |
emilmont | 62:7e6c9f46b3bd | 504 | __I uint32_t INPUT; /* 0x048 input register */ |
emilmont | 62:7e6c9f46b3bd | 505 | __IO uint16_t REGMODE_L; /* 0x04C match - capture registers mode register L */ |
emilmont | 62:7e6c9f46b3bd | 506 | __IO uint16_t REGMODE_H; /* 0x04E match - capture registers mode register H */ |
emilmont | 62:7e6c9f46b3bd | 507 | __IO uint32_t OUTPUT; /* 0x050 output register */ |
emilmont | 62:7e6c9f46b3bd | 508 | __IO uint32_t OUTPUTDIRCTRL; /* 0x054 Output counter direction Control Register */ |
emilmont | 62:7e6c9f46b3bd | 509 | __IO uint32_t RES; /* 0x058 conflict resolution register */ |
emilmont | 62:7e6c9f46b3bd | 510 | uint32_t RESERVED2[37]; /* 0x05C-0x0EC reserved */ |
emilmont | 62:7e6c9f46b3bd | 511 | __IO uint32_t EVEN; /* 0x0F0 event enable register */ |
emilmont | 62:7e6c9f46b3bd | 512 | __IO uint32_t EVFLAG; /* 0x0F4 event flag register */ |
emilmont | 62:7e6c9f46b3bd | 513 | __IO uint32_t CONEN; /* 0x0F8 conflict enable register */ |
emilmont | 62:7e6c9f46b3bd | 514 | __IO uint32_t CONFLAG; /* 0x0FC conflict flag register */ |
emilmont | 62:7e6c9f46b3bd | 515 | |
emilmont | 62:7e6c9f46b3bd | 516 | union { |
emilmont | 62:7e6c9f46b3bd | 517 | __IO union { /* 0x100-... Match / Capture value */ |
emilmont | 62:7e6c9f46b3bd | 518 | uint32_t U; /* SCTMATCH[i].U Unified 32-bit register */ |
emilmont | 62:7e6c9f46b3bd | 519 | struct { |
emilmont | 62:7e6c9f46b3bd | 520 | uint16_t L; /* SCTMATCH[i].L Access to L value */ |
emilmont | 62:7e6c9f46b3bd | 521 | uint16_t H; /* SCTMATCH[i].H Access to H value */ |
emilmont | 62:7e6c9f46b3bd | 522 | }; |
emilmont | 62:7e6c9f46b3bd | 523 | } MATCH[CONFIG_SCT_nRG]; |
emilmont | 62:7e6c9f46b3bd | 524 | __I union { |
emilmont | 62:7e6c9f46b3bd | 525 | uint32_t U; /* SCTCAP[i].U Unified 32-bit register */ |
emilmont | 62:7e6c9f46b3bd | 526 | struct { |
emilmont | 62:7e6c9f46b3bd | 527 | uint16_t L; /* SCTCAP[i].L Access to H value */ |
emilmont | 62:7e6c9f46b3bd | 528 | uint16_t H; /* SCTCAP[i].H Access to H value */ |
emilmont | 62:7e6c9f46b3bd | 529 | }; |
emilmont | 62:7e6c9f46b3bd | 530 | } CAP[CONFIG_SCT_nRG]; |
emilmont | 62:7e6c9f46b3bd | 531 | }; |
emilmont | 62:7e6c9f46b3bd | 532 | |
emilmont | 62:7e6c9f46b3bd | 533 | |
emilmont | 62:7e6c9f46b3bd | 534 | uint32_t RESERVED3[32-CONFIG_SCT_nRG]; /* ...-0x17C reserved */ |
emilmont | 62:7e6c9f46b3bd | 535 | |
emilmont | 62:7e6c9f46b3bd | 536 | union { |
emilmont | 62:7e6c9f46b3bd | 537 | __IO uint16_t MATCH_L[CONFIG_SCT_nRG]; /* 0x180-... Match Value L counter */ |
emilmont | 62:7e6c9f46b3bd | 538 | __I uint16_t CAP_L[CONFIG_SCT_nRG]; /* 0x180-... Capture Value L counter */ |
emilmont | 62:7e6c9f46b3bd | 539 | }; |
emilmont | 62:7e6c9f46b3bd | 540 | uint16_t RESERVED4[32-CONFIG_SCT_nRG]; /* ...-0x1BE reserved */ |
emilmont | 62:7e6c9f46b3bd | 541 | union { |
emilmont | 62:7e6c9f46b3bd | 542 | __IO uint16_t MATCH_H[CONFIG_SCT_nRG]; /* 0x1C0-... Match Value H counter */ |
emilmont | 62:7e6c9f46b3bd | 543 | __I uint16_t CAP_H[CONFIG_SCT_nRG]; /* 0x1C0-... Capture Value H counter */ |
emilmont | 62:7e6c9f46b3bd | 544 | }; |
emilmont | 62:7e6c9f46b3bd | 545 | |
emilmont | 62:7e6c9f46b3bd | 546 | uint16_t RESERVED5[32-CONFIG_SCT_nRG]; /* ...-0x1FE reserved */ |
emilmont | 62:7e6c9f46b3bd | 547 | |
emilmont | 62:7e6c9f46b3bd | 548 | |
emilmont | 62:7e6c9f46b3bd | 549 | union { |
emilmont | 62:7e6c9f46b3bd | 550 | __IO union { /* 0x200-... Match Reload / Capture Control value */ |
emilmont | 62:7e6c9f46b3bd | 551 | uint32_t U; /* SCTMATCHREL[i].U Unified 32-bit register */ |
emilmont | 62:7e6c9f46b3bd | 552 | struct { |
emilmont | 62:7e6c9f46b3bd | 553 | uint16_t L; /* SCTMATCHREL[i].L Access to L value */ |
emilmont | 62:7e6c9f46b3bd | 554 | uint16_t H; /* SCTMATCHREL[i].H Access to H value */ |
emilmont | 62:7e6c9f46b3bd | 555 | }; |
emilmont | 62:7e6c9f46b3bd | 556 | } MATCHREL[CONFIG_SCT_nRG]; |
emilmont | 62:7e6c9f46b3bd | 557 | __IO union { |
emilmont | 62:7e6c9f46b3bd | 558 | uint32_t U; /* SCTCAPCTRL[i].U Unified 32-bit register */ |
emilmont | 62:7e6c9f46b3bd | 559 | struct { |
emilmont | 62:7e6c9f46b3bd | 560 | uint16_t L; /* SCTCAPCTRL[i].L Access to H value */ |
emilmont | 62:7e6c9f46b3bd | 561 | uint16_t H; /* SCTCAPCTRL[i].H Access to H value */ |
emilmont | 62:7e6c9f46b3bd | 562 | }; |
emilmont | 62:7e6c9f46b3bd | 563 | } CAPCTRL[CONFIG_SCT_nRG]; |
emilmont | 62:7e6c9f46b3bd | 564 | }; |
emilmont | 62:7e6c9f46b3bd | 565 | |
emilmont | 62:7e6c9f46b3bd | 566 | uint32_t RESERVED6[32-CONFIG_SCT_nRG]; /* ...-0x27C reserved */ |
emilmont | 62:7e6c9f46b3bd | 567 | |
emilmont | 62:7e6c9f46b3bd | 568 | union { |
emilmont | 62:7e6c9f46b3bd | 569 | __IO uint16_t MATCHREL_L[CONFIG_SCT_nRG]; /* 0x280-... Match Reload value L counter */ |
emilmont | 62:7e6c9f46b3bd | 570 | __IO uint16_t CAPCTRL_L[CONFIG_SCT_nRG]; /* 0x280-... Capture Control value L counter */ |
emilmont | 62:7e6c9f46b3bd | 571 | }; |
emilmont | 62:7e6c9f46b3bd | 572 | uint16_t RESERVED7[32-CONFIG_SCT_nRG]; /* ...-0x2BE reserved */ |
emilmont | 62:7e6c9f46b3bd | 573 | union { |
emilmont | 62:7e6c9f46b3bd | 574 | __IO uint16_t MATCHREL_H[CONFIG_SCT_nRG]; /* 0x2C0-... Match Reload value H counter */ |
emilmont | 62:7e6c9f46b3bd | 575 | __IO uint16_t CAPCTRL_H[CONFIG_SCT_nRG]; /* 0x2C0-... Capture Control value H counter */ |
emilmont | 62:7e6c9f46b3bd | 576 | }; |
emilmont | 62:7e6c9f46b3bd | 577 | uint16_t RESERVED8[32-CONFIG_SCT_nRG]; /* ...-0x2FE reserved */ |
emilmont | 62:7e6c9f46b3bd | 578 | |
emilmont | 62:7e6c9f46b3bd | 579 | __IO struct { /* 0x300-0x3FC SCTEVENT[i].STATE / SCTEVENT[i].CTRL*/ |
emilmont | 62:7e6c9f46b3bd | 580 | uint32_t STATE; /* Event State Register */ |
emilmont | 62:7e6c9f46b3bd | 581 | uint32_t CTRL; /* Event Control Register */ |
emilmont | 62:7e6c9f46b3bd | 582 | } EVENT[CONFIG_SCT_nEV]; |
emilmont | 62:7e6c9f46b3bd | 583 | |
emilmont | 62:7e6c9f46b3bd | 584 | uint32_t RESERVED9[128-2*CONFIG_SCT_nEV]; /* ...-0x4FC reserved */ |
emilmont | 62:7e6c9f46b3bd | 585 | |
emilmont | 62:7e6c9f46b3bd | 586 | __IO struct { /* 0x500-0x57C SCTOUT[i].SET / SCTOUT[i].CLR */ |
emilmont | 62:7e6c9f46b3bd | 587 | uint32_t SET; /* Output n Set Register */ |
emilmont | 62:7e6c9f46b3bd | 588 | uint32_t CLR; /* Output n Clear Register */ |
emilmont | 62:7e6c9f46b3bd | 589 | } OUT[CONFIG_SCT_nOU]; |
emilmont | 62:7e6c9f46b3bd | 590 | |
emilmont | 62:7e6c9f46b3bd | 591 | uint32_t RESERVED10[191-2*CONFIG_SCT_nOU]; /* ...-0x7F8 reserved */ |
emilmont | 62:7e6c9f46b3bd | 592 | |
emilmont | 62:7e6c9f46b3bd | 593 | __I uint32_t MODULECONTENT; /* 0x7FC Module Content */ |
emilmont | 62:7e6c9f46b3bd | 594 | |
emilmont | 62:7e6c9f46b3bd | 595 | } LPC_SCT_TypeDef; |
emilmont | 62:7e6c9f46b3bd | 596 | /*@}*/ /* end of group LPC8xx_SCT */ |
emilmont | 62:7e6c9f46b3bd | 597 | |
emilmont | 62:7e6c9f46b3bd | 598 | |
emilmont | 62:7e6c9f46b3bd | 599 | /*------------- Watchdog Timer (WWDT) -----------------------------------------*/ |
emilmont | 62:7e6c9f46b3bd | 600 | /** @addtogroup LPC8xx_WDT LPC8xx WatchDog Timer |
emilmont | 62:7e6c9f46b3bd | 601 | @{ |
emilmont | 62:7e6c9f46b3bd | 602 | */ |
emilmont | 62:7e6c9f46b3bd | 603 | typedef struct |
emilmont | 62:7e6c9f46b3bd | 604 | { |
emilmont | 62:7e6c9f46b3bd | 605 | __IO uint32_t MOD; /*!< Offset: 0x000 Watchdog mode register (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 606 | __IO uint32_t TC; /*!< Offset: 0x004 Watchdog timer constant register (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 607 | __O uint32_t FEED; /*!< Offset: 0x008 Watchdog feed sequence register (W) */ |
emilmont | 62:7e6c9f46b3bd | 608 | __I uint32_t TV; /*!< Offset: 0x00C Watchdog timer value register (R) */ |
emilmont | 62:7e6c9f46b3bd | 609 | uint32_t RESERVED; /*!< Offset: 0x010 RESERVED */ |
emilmont | 62:7e6c9f46b3bd | 610 | __IO uint32_t WARNINT; /*!< Offset: 0x014 Watchdog timer warning int. register (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 611 | __IO uint32_t WINDOW; /*!< Offset: 0x018 Watchdog timer window value register (R/W) */ |
emilmont | 62:7e6c9f46b3bd | 612 | } LPC_WWDT_TypeDef; |
emilmont | 62:7e6c9f46b3bd | 613 | /*@}*/ /* end of group LPC8xx_WDT */ |
emilmont | 62:7e6c9f46b3bd | 614 | |
emilmont | 62:7e6c9f46b3bd | 615 | |
emilmont | 62:7e6c9f46b3bd | 616 | #if defined ( __CC_ARM ) |
emilmont | 62:7e6c9f46b3bd | 617 | #pragma no_anon_unions |
emilmont | 62:7e6c9f46b3bd | 618 | #endif |
emilmont | 62:7e6c9f46b3bd | 619 | |
emilmont | 62:7e6c9f46b3bd | 620 | /******************************************************************************/ |
emilmont | 62:7e6c9f46b3bd | 621 | /* Peripheral memory map */ |
emilmont | 62:7e6c9f46b3bd | 622 | /******************************************************************************/ |
emilmont | 62:7e6c9f46b3bd | 623 | /* Base addresses */ |
emilmont | 62:7e6c9f46b3bd | 624 | #define LPC_FLASH_BASE (0x00000000UL) |
emilmont | 62:7e6c9f46b3bd | 625 | #define LPC_RAM_BASE (0x10000000UL) |
emilmont | 62:7e6c9f46b3bd | 626 | #define LPC_ROM_BASE (0x1FFF0000UL) |
emilmont | 62:7e6c9f46b3bd | 627 | #define LPC_APB0_BASE (0x40000000UL) |
emilmont | 62:7e6c9f46b3bd | 628 | #define LPC_AHB_BASE (0x50000000UL) |
emilmont | 62:7e6c9f46b3bd | 629 | |
emilmont | 62:7e6c9f46b3bd | 630 | /* APB0 peripherals */ |
emilmont | 62:7e6c9f46b3bd | 631 | #define LPC_WWDT_BASE (LPC_APB0_BASE + 0x00000) |
emilmont | 62:7e6c9f46b3bd | 632 | #define LPC_MRT_BASE (LPC_APB0_BASE + 0x04000) |
emilmont | 62:7e6c9f46b3bd | 633 | #define LPC_WKT_BASE (LPC_APB0_BASE + 0x08000) |
emilmont | 62:7e6c9f46b3bd | 634 | #define LPC_SWM_BASE (LPC_APB0_BASE + 0x0C000) |
emilmont | 62:7e6c9f46b3bd | 635 | #define LPC_PMU_BASE (LPC_APB0_BASE + 0x20000) |
emilmont | 62:7e6c9f46b3bd | 636 | #define LPC_CMP_BASE (LPC_APB0_BASE + 0x24000) |
emilmont | 62:7e6c9f46b3bd | 637 | |
emilmont | 62:7e6c9f46b3bd | 638 | #define LPC_FLASHCTRL_BASE (LPC_APB0_BASE + 0x40000) |
emilmont | 62:7e6c9f46b3bd | 639 | #define LPC_IOCON_BASE (LPC_APB0_BASE + 0x44000) |
emilmont | 62:7e6c9f46b3bd | 640 | #define LPC_SYSCON_BASE (LPC_APB0_BASE + 0x48000) |
emilmont | 62:7e6c9f46b3bd | 641 | #define LPC_I2C_BASE (LPC_APB0_BASE + 0x50000) |
emilmont | 62:7e6c9f46b3bd | 642 | #define LPC_SPI0_BASE (LPC_APB0_BASE + 0x58000) |
emilmont | 62:7e6c9f46b3bd | 643 | #define LPC_SPI1_BASE (LPC_APB0_BASE + 0x5C000) |
emilmont | 62:7e6c9f46b3bd | 644 | #define LPC_USART0_BASE (LPC_APB0_BASE + 0x64000) |
emilmont | 62:7e6c9f46b3bd | 645 | #define LPC_USART1_BASE (LPC_APB0_BASE + 0x68000) |
emilmont | 62:7e6c9f46b3bd | 646 | #define LPC_USART2_BASE (LPC_APB0_BASE + 0x6C000) |
emilmont | 62:7e6c9f46b3bd | 647 | |
emilmont | 62:7e6c9f46b3bd | 648 | /* AHB peripherals */ |
emilmont | 62:7e6c9f46b3bd | 649 | #define LPC_CRC_BASE (LPC_AHB_BASE + 0x00000) |
emilmont | 62:7e6c9f46b3bd | 650 | #define LPC_SCT_BASE (LPC_AHB_BASE + 0x04000) |
emilmont | 62:7e6c9f46b3bd | 651 | |
emilmont | 62:7e6c9f46b3bd | 652 | #define LPC_GPIO_PORT_BASE (0xA0000000) |
emilmont | 62:7e6c9f46b3bd | 653 | #define LPC_PIN_INT_BASE (LPC_GPIO_PORT_BASE + 0x4000) |
emilmont | 62:7e6c9f46b3bd | 654 | |
emilmont | 62:7e6c9f46b3bd | 655 | /******************************************************************************/ |
emilmont | 62:7e6c9f46b3bd | 656 | /* Peripheral declaration */ |
emilmont | 62:7e6c9f46b3bd | 657 | /******************************************************************************/ |
emilmont | 62:7e6c9f46b3bd | 658 | #define LPC_WWDT ((LPC_WWDT_TypeDef *) LPC_WWDT_BASE ) |
emilmont | 62:7e6c9f46b3bd | 659 | #define LPC_MRT ((LPC_MRT_TypeDef *) LPC_MRT_BASE ) |
emilmont | 62:7e6c9f46b3bd | 660 | |
emilmont | 62:7e6c9f46b3bd | 661 | |
emilmont | 62:7e6c9f46b3bd | 662 | #define LPC_WKT ((LPC_WKT_TypeDef *) LPC_WKT_BASE ) |
emilmont | 62:7e6c9f46b3bd | 663 | #define LPC_SWM ((LPC_SWM_TypeDef *) LPC_SWM_BASE ) |
emilmont | 62:7e6c9f46b3bd | 664 | #define LPC_PMU ((LPC_PMU_TypeDef *) LPC_PMU_BASE ) |
emilmont | 62:7e6c9f46b3bd | 665 | #define LPC_CMP ((LPC_CMP_TypeDef *) LPC_CMP_BASE ) |
emilmont | 62:7e6c9f46b3bd | 666 | |
emilmont | 62:7e6c9f46b3bd | 667 | #define LPC_FLASHCTRL ((LPC_FLASHCTRL_TypeDef *) LPC_FLASHCTRL_BASE ) |
emilmont | 62:7e6c9f46b3bd | 668 | #define LPC_IOCON ((LPC_IOCON_TypeDef *) LPC_IOCON_BASE ) |
emilmont | 62:7e6c9f46b3bd | 669 | #define LPC_SYSCON ((LPC_SYSCON_TypeDef *) LPC_SYSCON_BASE) |
emilmont | 62:7e6c9f46b3bd | 670 | #define LPC_I2C ((LPC_I2C_TypeDef *) LPC_I2C_BASE ) |
emilmont | 62:7e6c9f46b3bd | 671 | #define LPC_SPI0 ((LPC_SPI_TypeDef *) LPC_SPI0_BASE ) |
emilmont | 62:7e6c9f46b3bd | 672 | #define LPC_SPI1 ((LPC_SPI_TypeDef *) LPC_SPI1_BASE ) |
emilmont | 62:7e6c9f46b3bd | 673 | #define LPC_USART0 ((LPC_USART_TypeDef *) LPC_USART0_BASE ) |
emilmont | 62:7e6c9f46b3bd | 674 | #define LPC_USART1 ((LPC_USART_TypeDef *) LPC_USART1_BASE ) |
emilmont | 62:7e6c9f46b3bd | 675 | #define LPC_USART2 ((LPC_USART_TypeDef *) LPC_USART2_BASE ) |
emilmont | 62:7e6c9f46b3bd | 676 | |
emilmont | 62:7e6c9f46b3bd | 677 | #define LPC_CRC ((LPC_CRC_TypeDef *) LPC_CRC_BASE ) |
emilmont | 62:7e6c9f46b3bd | 678 | #define LPC_SCT ((LPC_SCT_TypeDef *) LPC_SCT_BASE ) |
emilmont | 62:7e6c9f46b3bd | 679 | |
emilmont | 62:7e6c9f46b3bd | 680 | #define LPC_GPIO_PORT ((LPC_GPIO_PORT_TypeDef *) LPC_GPIO_PORT_BASE ) |
emilmont | 62:7e6c9f46b3bd | 681 | #define LPC_PIN_INT ((LPC_PIN_INT_TypeDef *) LPC_PIN_INT_BASE ) |
emilmont | 62:7e6c9f46b3bd | 682 | |
emilmont | 62:7e6c9f46b3bd | 683 | #ifdef __cplusplus |
emilmont | 62:7e6c9f46b3bd | 684 | } |
emilmont | 62:7e6c9f46b3bd | 685 | #endif |
emilmont | 62:7e6c9f46b3bd | 686 | |
emilmont | 62:7e6c9f46b3bd | 687 | #endif /* __LPC8xx_H__ */ |