1 /**********************************************************************
\r
2 * $Id$ lpc18xx_scu.h 2011-06-02
\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
8 * @date 02. June. 2011
\r
9 * @author NXP MCU SW Application Team
\r
11 * Copyright(C) 2011, NXP Semiconductor
\r
12 * All rights reserved.
\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
27 /* Peripheral group ----------------------------------------------------------- */
\r
28 /** @defgroup SCU SCU (System Control Unit)
\r
29 * @ingroup LPC1800CMSIS_FwLib_Drivers
\r
41 /* Private macros ------------------------------------------------------------- */
\r
42 /** @defgroup SCT_Private_Macros SCT Private Macros
\r
46 /** Port offset definition */
\r
47 #define PORT_OFFSET 0x80
\r
48 /** Pin offset definition */
\r
49 #define PIN_OFFSET 0x04
\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
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
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
80 /* Public Functions ----------------------------------------------------------- */
\r
81 /** @defgroup SCU_Public_Functions SCU Public Functions
\r
85 void scu_pinmux(uint8_t port, uint8_t pin, uint8_t mode, uint8_t func);
\r
95 #endif /* end __SCU_H */
\r
101 /* --------------------------------- End Of File ------------------------------ */
\r