CMSIS2000  0.0.7
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
lpc2xxx_pconp.h
Go to the documentation of this file.
1 /*
2  * CMSIS2000
3  * CMSIS-like sources for LPC2xxx series MCUs
4  *
5  * (C) Copyright 2011-2012, Dmitriy Cherepanov, All Rights Reserved
6  *
7  * Version: 0.0.7
8  * Date of the Last Update: 2013-03-04
9  *
10  * Permission is hereby granted, free of charge, to any person obtaining a copy
11  * of this software and associated documentation files (the "Software"), to
12  * deal in the Software without restriction, including without limitation the
13  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
14  * sell copies of the Software, and to permit persons to whom the Software is
15  * furnished to do so, subject to the following conditions:
16  *
17  * The above copyright notice and this permission notice shall be included in
18  * all copies or substantial portions of the Software.
19  *
20  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
26  * IN THE SOFTWARE.
27  *
28  * Do not be lasy! For the latest version see http://irtos.sourceforge.net .
29  *
30  *
31 #*/
32 
33 #ifndef _PORT_LPC2XXX_PCONP_H_
34 #define _PORT_LPC2XXX_PCONP_H_ 1
35 /*-----------Документация Doxygen -- Doxygen documentation -----------------*/
36 /** \file
37  *\if russian_lng
38  * Маски периферийных устройств в LPC для PCONP
39  *\else
40  * peripheries masks for PCONP
41  *\endif
42  * \ingroup LPC2xxx_System_periphiral
43  * @{
44  */
45 
46 #if _HASBSPBRD > 0
47 #include "bsp_board_def.h"/* board /definitions if you do not have this file then create it with '#include "mcu_id.h"' line*/
48 #else
49  #include "mcu_id.h"
50 #endif
51 #if ((i_MCU_MODEL > 2300) || ((i_MCU_MODEL > 1700) && (i_MCU_MODEL < 1900)))
52 /*------ LPC peripheral numbers ----------------------------------------------*/
53 
54 #define PCTIMER0 (1<<1) /**< mask for TIMER0.*/
55 #define PCTIMER1 (1<<2) /**< mask for TIMER1. */
56 #define PCUART0 (1<<3) /**< mask for UART0. */
57 #define PCUART1 (1<<4) /**< mask for UART1. */
58 #define PCPWM0 (1<<5) /**< mask for PWM0. */
59 #define PCPWM1 (1<<6) /**< mask for PWM1 */
60 #define PCI2C0 (1<<7) /**< mask for I2C0. */
61 #define PCSPI (1<<8) /**< mask for SPI */
62 #define PCRTC (1<<9) /**< mask for RTC. */
63 #define PCSSP1 (1<<10) /**< mask for SSP1. */
64 #define PCDAC (1<<11) /**< mask for DAC. */
65 #define PCADC (1<<12) /**< mask for ADC. */
66 #define PCADC0 (1<<12) /**< mask for ADC.0 */
67 #define PCCAN1 (1<<13) /**< mask for CAN1.*/
68 #define PCCAN2 (1<<14) /**< mask for CAN2. */
69 #define PCACF (1<<15) /**< mask for CAN filtering.*/
70 
71 #define PCGPIO (1<<15) /**< mask for PCGPIO .*/
72 #define PCRIT (1<<16) /**< mask for PCRIT Repetitive Interrupt Timer power/clock control bit*/
73 #define PCMCPWM (1<<17) /**< mask for Motor Control PWM.*/
74 #define PCQEI (1<<18) /**< mask for the Quadrature Encoder Interface power/clock control bit. */
75 #define PCI2C1 (1<<19) /**< mask for I2C1. */
76 #define PCLCD (1<<20) /**< mask for LCD. */
77 #define PCADC1 (1<<20)
78 #define PCSSP0 (1<<21) /**< mask for SSP0. */
79 #define PCTIMER2 (1<<22) /**< mask for TIMER2 */
80 #define PCTIMER3 (1<<23) /**< mask for TIMER3. */
81 #define PCUART2 (1<<24)/**< mask for UART2 */
82 #define PCUART3 (1<<25)/**< mask for UART3. */
83 #define PCI2C2 (1<<26)/**< mask for I2C2. */
84 #define PCI2S (1<<27)/**< mask for I2S. */
85 #define PCMCI (1<<28)/**< mask for MCI. */
86 #define PCGPDMA (1<<29)
87 #define PCENET (1<<30)
88 #define PCUSB (1<<31)/**< mask for USB */
89 /*----------------------------------------------------------------------------*/
90 
91 /** \brief TURN ON PERIPHIRAL MODULE in NXP controller
92  */
93 #define PORT_LPC2XXX_PWR_CONTRL_ON(_lpc_periph) LPC_SC->PCONP = LPC_SC->PCONP | (PC##_lpc_periph)
94 #define PORT_LPC2XXX_PWR_CONTRL_OFF(_lpc_periph) LPC_SC->PCONP = LPC_SC->PCONP & (~(PC##_lpc_periph))
95 
96 
97 #endif
98 /** @} end of group LPC2xxx_System_periphiral */
99 #endif /* _PORT_LPC2XXX_PCONP_H_ */