diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-12-08 08:47:14 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-12-08 08:47:14 +0000 |
commit | 3ff9afd04851ec97d66d6833520b49dc18f35ea4 (patch) | |
tree | 64490d99322e87fa9457efa59808fed5dff2a341 /demos/ARM7-LPC214x-GCC/board.c | |
parent | 456490bf06d9d6eccf7a02b18fba94058c81f26c (diff) | |
download | ChibiOS-3ff9afd04851ec97d66d6833520b49dc18f35ea4.tar.gz ChibiOS-3ff9afd04851ec97d66d6833520b49dc18f35ea4.tar.bz2 ChibiOS-3ff9afd04851ec97d66d6833520b49dc18f35ea4.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1389 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/ARM7-LPC214x-GCC/board.c')
-rw-r--r-- | demos/ARM7-LPC214x-GCC/board.c | 57 |
1 files changed, 3 insertions, 54 deletions
diff --git a/demos/ARM7-LPC214x-GCC/board.c b/demos/ARM7-LPC214x-GCC/board.c index 2c041b384..9c4c7e335 100644 --- a/demos/ARM7-LPC214x-GCC/board.c +++ b/demos/ARM7-LPC214x-GCC/board.c @@ -29,19 +29,6 @@ #include "buzzer.h"
/*
- * Non-vectored IRQs handling here.
- */
-static CH_IRQ_HANDLER(IrqHandler) {
-
- CH_IRQ_PROLOGUE();
-
- /* nothing */
-
- VICVectAddr = 0;
- CH_IRQ_EPILOGUE();
-}
-
-/*
* Timer 0 IRQ handling here.
*/
static CH_IRQ_HANDLER(T0IrqHandler) {
@@ -76,43 +63,7 @@ static const LPC214xFIOConfig config = */
void hwinit0(void) {
- /*
- * All peripherals clock disabled by default in order to save power.
- */
- PCONP = PCRTC | PCTIM0;
-
- /*
- * MAM setup.
- */
- MAMTIM = 0x3; /* 3 cycles for flash accesses. */
- MAMCR = 0x2; /* MAM fully enabled. */
-
- /*
- * PLL setup for Fosc=12MHz and CCLK=48MHz.
- * P=2 M=3.
- */
- PLL *pll = PLL0Base;
- pll->PLL_CFG = 0x23; /* P and M values. */
- pll->PLL_CON = 0x1; /* Enables the PLL 0. */
- pll->PLL_FEED = 0xAA;
- pll->PLL_FEED = 0x55;
- while (!(pll->PLL_STAT & 0x400))
- ; /* Wait for PLL lock. */
-
- pll->PLL_CON = 0x3; /* Connects the PLL. */
- pll->PLL_FEED = 0xAA;
- pll->PLL_FEED = 0x55;
-
- /*
- * VPB setup.
- * PCLK = CCLK / 4.
- */
- VPBDIV = VPD_D4;
-
- /*
- * I/O pins configuration.
- */
- palInit(&config);
+ lpc214x_clock_init();
}
/*
@@ -123,10 +74,9 @@ void hwinit0(void) { void hwinit1(void) {
/*
- * Interrupt vectors assignment.
+ * HAL initialization.
*/
- vic_init();
- VICDefVectAddr = (IOREG32)IrqHandler;
+ halInit();
/*
* System Timer initialization, 1ms intervals.
@@ -143,7 +93,6 @@ void hwinit1(void) { /*
* Other subsystems.
*/
- sdInit();
ssp_init();
InitMMC();
InitBuzzer();
|