From 2dd35e6529e9594f1b9c10b1935f72b4eb7dcd1d Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Thu, 30 Jul 2015 00:47:50 +0200 Subject: [PATCH] ARM: prettify cmsis-system_lpc11xx.c/.h. Again, remove trailing whitespace and such stuff. --- cmsis-system_lpc11xx.c | 15 +++++++-------- cmsis-system_lpc11xx.h | 18 +++++++----------- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/cmsis-system_lpc11xx.c b/cmsis-system_lpc11xx.c index 484ed03..3d65a27 100644 --- a/cmsis-system_lpc11xx.c +++ b/cmsis-system_lpc11xx.c @@ -22,15 +22,13 @@ * ******************************************************************************/ /* - Notes for Teacup: + Copied in spring 2015 from https://github.com/mbedmicro/mbed, file + mbed/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11XX_11CXX/ + TARGET_LPC11XX/system_LPC11xx.c - Copied from $(MBED)/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11XX_11CXX/TARGET_LPC11XX/system_LPC11xx.c. + Changes for Teacup: - Used only to get things running quickly. Without serial it's almost - impossible to see wether code changes work. Should go away soon, because - all this MBED stuff is too bloated for Teacup's purposes. - - - Prefixed names of #include files with mbed- to match the names of the + - Prefixed names of #include files with cmsis- to match the names of the copies in the Teacup repo. - Wrapped the whole file in #ifdef __ARMEL__ to not cause conflicts with AVR builds. @@ -41,6 +39,7 @@ Replaced by this marker: // Moved definitions from here to system_LPC11xx.h. and replaced #include with #include "mbed-system_LPC11xx.h" + - Replaced tabs by spaces and removed trailing whitespace. */ #ifdef __ARMEL__ @@ -160,7 +159,7 @@ void SystemInit (void) { #if ((MAINCLKSEL_Val & 0x03) == 3) /* Main Clock is PLL Out */ LPC_SYSCON->SYSPLLCTRL = SYSPLLCTRL_Val; LPC_SYSCON->PDRUNCFG &= ~(1 << 7); /* Power-up SYSPLL */ - while (!(LPC_SYSCON->SYSPLLSTAT & 0x01)); /* Wait Until PLL Locked */ + while (!(LPC_SYSCON->SYSPLLSTAT & 0x01)); /* Wait Until PLL Locked */ #endif #if (((MAINCLKSEL_Val & 0x03) == 2) ) diff --git a/cmsis-system_lpc11xx.h b/cmsis-system_lpc11xx.h index 04fa272..4f4ce3b 100644 --- a/cmsis-system_lpc11xx.h +++ b/cmsis-system_lpc11xx.h @@ -22,24 +22,20 @@ * ******************************************************************************/ /* - Notes for Teacup: + Copied in spring 2015 from https://github.com/mbedmicro/mbed, file + mbed/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11XX_11CXX/ + system_LPC11xx.h - Copied from $(MBED)/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11XX_11CXX/system_LPC11xx.h. + Changes for Teacup: - Used only to get things running quickly. Without serial it's almost - impossible to see wether code changes work. Should go away soon, because - all this MBED stuff is too bloated for Teacup's purposes. - - - Prefixed names of #include files with mbed- to match the names of the - copies in the Teacup repo. - Moved all the definitions from system_LPC11xx.h to here to have them available elsewhere. It's the section between // From system_LPC11xx.c start. and // From system_LPC11xx.c start. + - Replaced tabs by spaces and removed trailing whitespace. */ - #ifndef __SYSTEM_LPC11xx_H #define __SYSTEM_LPC11xx_H @@ -132,8 +128,8 @@ extern "C" { #define SYSOSCCTRL_Val 0x00000000 // Reset: 0x000 #define WDTOSCCTRL_Val 0x00000000 // Reset: 0x000 #define SYSPLLCTRL_Val 0x00000023 // Reset: 0x000 -#define SYSPLLCLKSEL_Val 0x00000000 // Reset: 0x000 // Define as using IRC -#define MAINCLKSEL_Val 0x00000003 // Reset: 0x000 // Define as using System PLL clock out +#define SYSPLLCLKSEL_Val 0x00000000 // Reset: 0x000 // Define as using IRC +#define MAINCLKSEL_Val 0x00000003 // Reset: 0x000 // Define as using System PLL clock out #define SYSAHBCLKDIV_Val 0x00000001 // Reset: 0x001 /*