ARM: prettify cmsis-system_lpc11xx.c/.h.
Again, remove trailing whitespace and such stuff.
This commit is contained in:
parent
b1490658cf
commit
2dd35e6529
|
|
@ -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
|
- Prefixed names of #include files with cmsis- to match the names of the
|
||||||
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.
|
copies in the Teacup repo.
|
||||||
- Wrapped the whole file in #ifdef __ARMEL__ to not cause conflicts with
|
- Wrapped the whole file in #ifdef __ARMEL__ to not cause conflicts with
|
||||||
AVR builds.
|
AVR builds.
|
||||||
|
|
@ -41,6 +39,7 @@
|
||||||
Replaced by this marker:
|
Replaced by this marker:
|
||||||
// Moved definitions from here to system_LPC11xx.h.
|
// Moved definitions from here to system_LPC11xx.h.
|
||||||
and replaced #include <stdint.h> with #include "mbed-system_LPC11xx.h"
|
and replaced #include <stdint.h> with #include "mbed-system_LPC11xx.h"
|
||||||
|
- Replaced tabs by spaces and removed trailing whitespace.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __ARMEL__
|
#ifdef __ARMEL__
|
||||||
|
|
@ -160,7 +159,7 @@ void SystemInit (void) {
|
||||||
#if ((MAINCLKSEL_Val & 0x03) == 3) /* Main Clock is PLL Out */
|
#if ((MAINCLKSEL_Val & 0x03) == 3) /* Main Clock is PLL Out */
|
||||||
LPC_SYSCON->SYSPLLCTRL = SYSPLLCTRL_Val;
|
LPC_SYSCON->SYSPLLCTRL = SYSPLLCTRL_Val;
|
||||||
LPC_SYSCON->PDRUNCFG &= ~(1 << 7); /* Power-up SYSPLL */
|
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
|
#endif
|
||||||
|
|
||||||
#if (((MAINCLKSEL_Val & 0x03) == 2) )
|
#if (((MAINCLKSEL_Val & 0x03) == 2) )
|
||||||
|
|
|
||||||
|
|
@ -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
|
- Moved all the definitions from system_LPC11xx.h to here to have them
|
||||||
available elsewhere. It's the section between
|
available elsewhere. It's the section between
|
||||||
// From system_LPC11xx.c start.
|
// From system_LPC11xx.c start.
|
||||||
and
|
and
|
||||||
// From system_LPC11xx.c start.
|
// From system_LPC11xx.c start.
|
||||||
|
- Replaced tabs by spaces and removed trailing whitespace.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __SYSTEM_LPC11xx_H
|
#ifndef __SYSTEM_LPC11xx_H
|
||||||
#define __SYSTEM_LPC11xx_H
|
#define __SYSTEM_LPC11xx_H
|
||||||
|
|
||||||
|
|
@ -132,8 +128,8 @@ extern "C" {
|
||||||
#define SYSOSCCTRL_Val 0x00000000 // Reset: 0x000
|
#define SYSOSCCTRL_Val 0x00000000 // Reset: 0x000
|
||||||
#define WDTOSCCTRL_Val 0x00000000 // Reset: 0x000
|
#define WDTOSCCTRL_Val 0x00000000 // Reset: 0x000
|
||||||
#define SYSPLLCTRL_Val 0x00000023 // Reset: 0x000
|
#define SYSPLLCTRL_Val 0x00000023 // Reset: 0x000
|
||||||
#define SYSPLLCLKSEL_Val 0x00000000 // Reset: 0x000 // Define as using IRC
|
#define SYSPLLCLKSEL_Val 0x00000000 // Reset: 0x000 // Define as using IRC
|
||||||
#define MAINCLKSEL_Val 0x00000003 // Reset: 0x000 // Define as using System PLL clock out
|
#define MAINCLKSEL_Val 0x00000003 // Reset: 0x000 // Define as using System PLL clock out
|
||||||
#define SYSAHBCLKDIV_Val 0x00000001 // Reset: 0x001
|
#define SYSAHBCLKDIV_Val 0x00000001 // Reset: 0x001
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue