diff options
Diffstat (limited to 'demos/ARM7-LPC214x-GCC-minimal/board.c')
-rw-r--r-- | demos/ARM7-LPC214x-GCC-minimal/board.c | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/demos/ARM7-LPC214x-GCC-minimal/board.c b/demos/ARM7-LPC214x-GCC-minimal/board.c index 2e56028cc..980626ab5 100644 --- a/demos/ARM7-LPC214x-GCC-minimal/board.c +++ b/demos/ARM7-LPC214x-GCC-minimal/board.c @@ -59,6 +59,18 @@ static CH_IRQ_HANDLER(T0IrqHandler) { }
/*
+ * Digital I/O ports static configuration as defined in @p board.h.
+ */
+static const LPC214xFIOConfig config =
+{
+ VAL_PINSEL0,
+ VAL_PINSEL1,
+ VAL_PINSEL2,
+ {VAL_FIO0PIN, VAL_FIO0DIR},
+ {VAL_FIO1PIN, VAL_FIO1DIR}
+};
+
+/*
* Early initialization code.
* This initialization is performed just after reset before BSS and DATA
* segments initialization.
@@ -101,14 +113,14 @@ void hwinit0(void) { /*
* I/O pins configuration.
*/
- PINSEL0 = VAL_PINSEL0;
- PINSEL1 = VAL_PINSEL1;
- PINSEL2 = VAL_PINSEL2;
- palInit();
- pal_lld_lpc214x_set_direction(IOPORT_A, VAL_FIO0DIR);
- palWritePort(IOPORT_A, 0xFFFFFFFF);
- pal_lld_lpc214x_set_direction(IOPORT_B, VAL_FIO1DIR);
- palWritePort(IOPORT_B, 0xFFFFFFFF);
+// PINSEL0 = VAL_PINSEL0;
+// PINSEL1 = VAL_PINSEL1;
+// PINSEL2 = VAL_PINSEL2;
+ palInit(&config);
+// pal_lld_lpc214x_set_direction(IOPORT_A, VAL_FIO0DIR);
+// palWritePort(IOPORT_A, 0xFFFFFFFF);
+// pal_lld_lpc214x_set_direction(IOPORT_B, VAL_FIO1DIR);
+// palWritePort(IOPORT_B, 0xFFFFFFFF);
}
/*
|