]> git.sur5r.net Git - freertos/blob - Demo/CORTEX_M4F_M0_LPC43xx_Keil/system/scu.c
Added fast book files to project - although fast boot is not integrated yet.
[freertos] / Demo / CORTEX_M4F_M0_LPC43xx_Keil / system / scu.c
1 /***********************************************************************\r
2  * $Id: scu.c 8242 2011-10-11 15:15:25Z nxp28536 $\r
3  *\r
4  * Project: LPC43xx Common\r
5  *\r
6  * Description:\r
7  *     This file contains code to configure the PINMUX\r
8  *\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
21 \r
22 #if defined CORE_M4\r
23 #include "LPC43xx.h"                    /* LPC43xx definitions                */\r
24 #endif\r
25 \r
26 #ifdef CORE_M0\r
27 #include "LPC43xx_M0.h"                /* LPC43xx definitions                */\r
28 #endif\r
29 \r
30 #include "type.h"\r
31 #include "scu.h"\r
32 \r
33 void scu_pinmux(unsigned port, unsigned pin, unsigned mode, unsigned func)\r
34 {\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
37 } /* scu_pinmux */\r