aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/boards
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-02-27 09:15:58 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-02-27 09:15:58 +0000
commit9cdc99632bd98b01131590651dfa3a1bbb857ae6 (patch)
tree3b4cd9d7f0ac461322c79081f1fc36e371b68ca1 /os/hal/boards
parentdbddccc61d62fb73d605e7b03c4692173f87abb7 (diff)
downloadChibiOS-9cdc99632bd98b01131590651dfa3a1bbb857ae6.tar.gz
ChibiOS-9cdc99632bd98b01131590651dfa3a1bbb857ae6.tar.bz2
ChibiOS-9cdc99632bd98b01131590651dfa3a1bbb857ae6.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6732 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/boards')
-rw-r--r--os/hal/boards/ST_EVB_SPC560D/board.c34
-rw-r--r--os/hal/boards/ST_EVB_SPC560D/board.h28
2 files changed, 32 insertions, 30 deletions
diff --git a/os/hal/boards/ST_EVB_SPC560D/board.c b/os/hal/boards/ST_EVB_SPC560D/board.c
index cb5f3027f..f59eed54f 100644
--- a/os/hal/boards/ST_EVB_SPC560D/board.c
+++ b/os/hal/boards/ST_EVB_SPC560D/board.c
@@ -19,31 +19,36 @@
#if HAL_USE_PAL || defined(__DOXYGEN__)
/* Initial setup of all defined pads, the list is terminated by a {-1, 0, 0}.*/
static const spc_siu_init_t spc_siu_init[] = {
- {PCR(PORT_B, PB_LIN0_TDX), PAL_HIGH, PAL_MODE_OUTPUT_ALTERNATE(1)},
- {PCR(PORT_B, PB_LIN0_RDX), PAL_HIGH, PAL_MODE_INPUT},
- {PCR(PORT_E, PE_BUTTON1), PAL_LOW, PAL_MODE_INPUT},
- {PCR(PORT_E, PE_BUTTON2), PAL_LOW, PAL_MODE_INPUT},
- {PCR(PORT_E, PE_BUTTON3), PAL_LOW, PAL_MODE_INPUT},
- {PCR(PORT_E, PE_BUTTON4), PAL_LOW, PAL_MODE_INPUT},
- {PCR(PORT_E, PE_LED1), PAL_HIGH, PAL_MODE_OUTPUT_PUSHPULL},
- {PCR(PORT_E, PE_LED2), PAL_HIGH, PAL_MODE_OUTPUT_PUSHPULL},
- {PCR(PORT_E, PE_LED3), PAL_HIGH, PAL_MODE_OUTPUT_PUSHPULL},
- {PCR(PORT_E, PE_LED4), PAL_HIGH, PAL_MODE_OUTPUT_PUSHPULL},
+ {PCR(PORT_B, PB_LIN0_TDX), PAL_HIGH, PAL_MODE_OUTPUT_ALTERNATE(1)},
+ {PCR(PORT_B, PB_LIN0_RDX), PAL_HIGH, PAL_MODE_INPUT},
+ {PCR(PORT_E, PE_BUTTON1), PAL_LOW, PAL_MODE_INPUT},
+ {PCR(PORT_E, PE_BUTTON2), PAL_LOW, PAL_MODE_INPUT},
+ {PCR(PORT_E, PE_BUTTON3), PAL_LOW, PAL_MODE_INPUT},
+ {PCR(PORT_E, PE_BUTTON4), PAL_LOW, PAL_MODE_INPUT},
+ {PCR(PORT_E, PE_LED1), PAL_HIGH, PAL_MODE_OUTPUT_PUSHPULL},
+ {PCR(PORT_E, PE_LED2), PAL_HIGH, PAL_MODE_OUTPUT_PUSHPULL},
+ {PCR(PORT_E, PE_LED3), PAL_HIGH, PAL_MODE_OUTPUT_PUSHPULL},
+ {PCR(PORT_E, PE_LED4), PAL_HIGH, PAL_MODE_OUTPUT_PUSHPULL},
{-1, 0, 0}
};
/* Initialization array for the PSMI registers.*/
static const uint8_t spc_padsels_init[SPC5_SIUL_NUM_PADSELS] = {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0,
};
/**
* @brief PAL setup.
*/
const PALConfig pal_default_config = {
- PAL_MODE_UNCONNECTED, /* Default mode for all undefined pads. */
+ PAL_MODE_UNCONNECTED,
spc_siu_init,
spc_padsels_init
};
@@ -63,5 +68,4 @@ void __early_init(void) {
* Board-specific initialization code.
*/
void boardInit(void) {
-
}
diff --git a/os/hal/boards/ST_EVB_SPC560D/board.h b/os/hal/boards/ST_EVB_SPC560D/board.h
index bca6f7245..eab91cba8 100644
--- a/os/hal/boards/ST_EVB_SPC560D/board.h
+++ b/os/hal/boards/ST_EVB_SPC560D/board.h
@@ -18,14 +18,14 @@
#define _BOARD_H_
/*
- * Setup for a generic SPC560Dxx proto board.
+ * Setup for a generic SPC560Dxx board.
*/
/*
* Board identifiers.
*/
-#define BOARD_GENERIC_SPC560D
-#define BOARD_NAME "Generic SPC560Dxx"
+#define BOARD_SPC560DXX_EVB
+#define BOARD_NAME "EVB with SPC560Dxx Mini Module"
/*
* Board frequencies.
@@ -37,18 +37,16 @@
/*
* I/O definitions.
*/
-#define PB_LIN0_TDX 2
-#define PB_LIN0_RDX 3
-
-#define PE_BUTTON1 0
-#define PE_BUTTON2 1
-#define PE_BUTTON3 2
-#define PE_BUTTON4 3
-
-#define PE_LED1 4
-#define PE_LED2 5
-#define PE_LED3 6
-#define PE_LED4 7
+#define PB_LIN0_TDX 2
+#define PB_LIN0_RDX 3
+#define PE_BUTTON1 0
+#define PE_BUTTON2 1
+#define PE_BUTTON3 2
+#define PE_BUTTON4 3
+#define PE_LED1 4
+#define PE_LED2 5
+#define PE_LED3 6
+#define PE_LED4 7
/*
* Support macros.