]> git.sur5r.net Git - freertos/blob - FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/ThirdParty/CMSISv2p10_LPC18xx_DriverLib/inc/lpc18xx_scu.h
Update copyright date ready for tagging V10.1.0.
[freertos] / FreeRTOS-Plus / Demo / FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC / ThirdParty / CMSISv2p10_LPC18xx_DriverLib / inc / lpc18xx_scu.h
1 /**********************************************************************\r
2 * $Id$          lpc18xx_scu.h           2011-06-02\r
3 *//**\r
4 * @file         lpc18xx_scu.h\r
5 * @brief        Contains all macro definitions and function prototypes\r
6 *                       support for SCU firmware library on LPC18xx\r
7 * @version      1.0\r
8 * @date         02. June. 2011\r
9 * @author       NXP MCU SW Application Team\r
10 *\r
11 * Copyright(C) 2011, NXP Semiconductor\r
12 * All rights reserved.\r
13 *\r
14 ***********************************************************************\r
15 * Software that is described herein is for illustrative purposes only\r
16 * which provides customers with programming information regarding the\r
17 * products. This software is supplied "AS IS" without any warranties.\r
18 * NXP Semiconductors assumes no responsibility or liability for the\r
19 * use of the software, conveys no license or title under any patent,\r
20 * copyright, or mask work right to the product. NXP Semiconductors\r
21 * reserves the right to make changes in the software without\r
22 * notification. NXP Semiconductors also make no representation or\r
23 * warranty that such application will be suitable for the specified\r
24 * use without further testing or modification.\r
25 **********************************************************************/\r
26 \r
27 /* Peripheral group ----------------------------------------------------------- */\r
28 /** @defgroup SCU       SCU (System Control Unit)\r
29  * @ingroup LPC1800CMSIS_FwLib_Drivers\r
30  * @{\r
31  */\r
32 \r
33 #ifndef __SCU_H\r
34 #define __SCU_H\r
35 \r
36 #ifdef __cplusplus\r
37 extern "C"\r
38 {\r
39 #endif\r
40 \r
41 /* Private macros ------------------------------------------------------------- */\r
42 /** @defgroup SCT_Private_Macros SCT Private Macros\r
43  * @{\r
44  */\r
45 \r
46 /** Port offset definition */\r
47 #define PORT_OFFSET     0x80\r
48 /** Pin offset definition */\r
49 #define PIN_OFFSET      0x04\r
50 \r
51 /* Pin modes */\r
52 #define MD_PUP  (0x0<<3)\r
53 #define MD_BUK  (0x1<<3)\r
54 #define MD_PLN  (0x2<<3)\r
55 #define MD_PDN  (0x3<<3)\r
56 #define MD_EHS  (0x1<<5)\r
57 #define MD_EZI  (0x1<<6)\r
58 #define MD_ZI   (0x1<<7)\r
59 #define MD_EHD0 (0x1<<8)\r
60 #define MD_EHD1 (0x1<<8)\r
61 #define MD_PLN_FAST (MD_PLN | MD_EZI | MD_ZI | MD_EHS)\r
62 // 0xF0\r
63 \r
64 /* Pin function */\r
65 #define FUNC0                   0x0                             /** Function 0  */\r
66 #define FUNC1                   0x1                             /** Function 1  */\r
67 #define FUNC2                   0x2                             /** Function 2  */\r
68 #define FUNC3                   0x3                             /** Function 3  */\r
69 #define FUNC4                   0x4\r
70 #define FUNC5                   0x5\r
71 #define FUNC6                   0x6\r
72 #define FUNC7                   0x7\r
73 /**\r
74  * @}\r
75  */\r
76 \r
77 #define LPC_SCU_PIN(po, pi)   (*(volatile int         *) (LPC_SCU_BASE + ((po) * 0x80) + ((pi) * 0x4))    )\r
78 #define LPC_SCU_CLK(c)        (*(volatile int         *) (LPC_SCU_BASE + 0xC00 + ((c) * 0x4))    )\r
79 \r
80 /* Public Functions ----------------------------------------------------------- */\r
81 /** @defgroup SCU_Public_Functions SCU Public Functions\r
82  * @{\r
83  */\r
84 \r
85 void scu_pinmux(uint8_t port, uint8_t pin, uint8_t mode, uint8_t func);\r
86 \r
87 /**\r
88  * @}\r
89  */\r
90 \r
91 #ifdef __cplusplus\r
92 }\r
93 #endif\r
94 \r
95 #endif /* end __SCU_H */\r
96 \r
97 /**\r
98  * @}\r
99  */\r
100 \r
101 /* --------------------------------- End Of File ------------------------------ */\r