1 /***********************************************************************
\r
2 * $Id: scu.c 8242 2011-10-11 15:15:25Z nxp28536 $
\r
4 * Project: LPC43xx Common
\r
7 * This file contains code to configure the PINMUX
\r
9 ***********************************************************************
\r
10 * Software that is described herein is for illustrative purposes only
\r
11 * which provides customers with programming information regarding the
\r
12 * products. This software is supplied "AS IS" without any warranties.
\r
13 * NXP Semiconductors assumes no responsibility or liability for the
\r
14 * use of the software, conveys no license or title under any patent,
\r
15 * copyright, or mask work right to the product. NXP Semiconductors
\r
16 * reserves the right to make changes in the software without
\r
17 * notification. NXP Semiconductors also make no representation or
\r
18 * warranty that such application will be suitable for the specified
\r
19 * use without further testing or modification.
\r
20 **********************************************************************/
\r
23 #include "LPC43xx.h" /* LPC43xx definitions */
\r
27 #include "LPC43xx_M0.h" /* LPC43xx definitions */
\r
33 void scu_pinmux(unsigned port, unsigned pin, unsigned mode, unsigned func)
\r
35 volatile unsigned int * const scu_base=(unsigned int*)(LPC_SCU_BASE);
\r
36 scu_base[(PORT_OFFSET*port+PIN_OFFSET*pin)/4]=mode+func;
\r