see: http://mbed.org/users/okini3939/notebook/low-power-lpc81x/

Committer:
okini3939
Date:
Fri Jun 07 22:47:35 2013 +0000
Revision:
1:f336c9774f7a
Parent:
0:349dc3aae37a
fix

Who changed what in which revision?

UserRevisionLine numberNew contents of line
okini3939 0:349dc3aae37a 1 /*
okini3939 0:349dc3aae37a 2 * @brief
okini3939 0:349dc3aae37a 3 * This file is used to config SwitchMatrix module.
okini3939 0:349dc3aae37a 4 *
okini3939 0:349dc3aae37a 5 * @note
okini3939 0:349dc3aae37a 6 * Copyright(C) NXP Semiconductors, 2013
okini3939 0:349dc3aae37a 7 * All rights reserved.
okini3939 0:349dc3aae37a 8 *
okini3939 0:349dc3aae37a 9 * @par
okini3939 0:349dc3aae37a 10 * Software that is described herein is for illustrative purposes only
okini3939 0:349dc3aae37a 11 * which provides customers with programming information regarding the
okini3939 0:349dc3aae37a 12 * LPC products. This software is supplied "AS IS" without any warranties of
okini3939 0:349dc3aae37a 13 * any kind, and NXP Semiconductors and its licensor disclaim any and
okini3939 0:349dc3aae37a 14 * all warranties, express or implied, including all implied warranties of
okini3939 0:349dc3aae37a 15 * merchantability, fitness for a particular purpose and non-infringement of
okini3939 0:349dc3aae37a 16 * intellectual property rights. NXP Semiconductors assumes no responsibility
okini3939 0:349dc3aae37a 17 * or liability for the use of the software, conveys no license or rights under any
okini3939 0:349dc3aae37a 18 * patent, copyright, mask work right, or any other intellectual property rights in
okini3939 0:349dc3aae37a 19 * or to any products. NXP Semiconductors reserves the right to make changes
okini3939 0:349dc3aae37a 20 * in the software without notification. NXP Semiconductors also makes no
okini3939 0:349dc3aae37a 21 * representation or warranty that such application will be suitable for the
okini3939 0:349dc3aae37a 22 * specified use without further testing or modification.
okini3939 0:349dc3aae37a 23 *
okini3939 0:349dc3aae37a 24 * @par
okini3939 0:349dc3aae37a 25 * Permission to use, copy, modify, and distribute this software and its
okini3939 0:349dc3aae37a 26 * documentation is hereby granted, under NXP Semiconductors' and its
okini3939 0:349dc3aae37a 27 * licensor's relevant copyrights in the software, without fee, provided that it
okini3939 0:349dc3aae37a 28 * is used in conjunction with NXP Semiconductors microcontrollers. This
okini3939 0:349dc3aae37a 29 * copyright, permission, and disclaimer notice must appear in all copies of
okini3939 0:349dc3aae37a 30 * this code.
okini3939 0:349dc3aae37a 31 */
okini3939 0:349dc3aae37a 32
okini3939 0:349dc3aae37a 33 #include "LPC8xx.h" /* LPC8xx Peripheral Registers */
okini3939 0:349dc3aae37a 34 #include "type.h"
okini3939 0:349dc3aae37a 35
okini3939 0:349dc3aae37a 36 void SwitchMatrix_Init()
okini3939 0:349dc3aae37a 37 {
okini3939 0:349dc3aae37a 38 /* Enable SWM clock */
okini3939 0:349dc3aae37a 39 LPC_SYSCON->SYSAHBCLKCTRL |= (1<<7);
okini3939 0:349dc3aae37a 40
okini3939 0:349dc3aae37a 41 /* Pin Assign 8 bit Configuration */
okini3939 0:349dc3aae37a 42 /* none */
okini3939 0:349dc3aae37a 43
okini3939 0:349dc3aae37a 44 /* Pin Assign 1 bit Configuration */
okini3939 0:349dc3aae37a 45 /* SWCLK */
okini3939 0:349dc3aae37a 46 /* SWDIO */
okini3939 0:349dc3aae37a 47 /* RESET */
okini3939 1:f336c9774f7a 48 LPC_SWM->PINENABLE0 = 0xffffffb3UL;
okini3939 0:349dc3aae37a 49 }
okini3939 0:349dc3aae37a 50
okini3939 0:349dc3aae37a 51 /**********************************************************************
okini3939 0:349dc3aae37a 52 ** End Of File
okini3939 0:349dc3aae37a 53 **********************************************************************/