From 4d1c817475411bea3a3b08426011ecd8faf0f44d Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 24 Feb 2014 11:09:08 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6722 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/boards/ST_EVB_SPC56EL/board.c | 35 +++++++++++++++++++---------------- os/hal/boards/ST_EVB_SPC56EL/board.h | 28 +++++++++++++--------------- 2 files changed, 32 insertions(+), 31 deletions(-) (limited to 'os/hal/boards/ST_EVB_SPC56EL') diff --git a/os/hal/boards/ST_EVB_SPC56EL/board.c b/os/hal/boards/ST_EVB_SPC56EL/board.c index 721f452e3..a6595d7d4 100644 --- a/os/hal/boards/ST_EVB_SPC56EL/board.c +++ b/os/hal/boards/ST_EVB_SPC56EL/board.c @@ -19,31 +19,35 @@ #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_D, PD_BUTTON1), PAL_LOW, PAL_MODE_INPUT}, - {PCR(PORT_D, PD_BUTTON2), PAL_LOW, PAL_MODE_INPUT}, - {PCR(PORT_D, PD_BUTTON3), PAL_LOW, PAL_MODE_INPUT}, - {PCR(PORT_D, PD_BUTTON4), PAL_LOW, PAL_MODE_INPUT}, - {PCR(PORT_D, PD_LED1), PAL_HIGH, PAL_MODE_OUTPUT_PUSHPULL}, - {PCR(PORT_D, PD_LED2), PAL_HIGH, PAL_MODE_OUTPUT_PUSHPULL}, - {PCR(PORT_D, PD_LED3), PAL_HIGH, PAL_MODE_OUTPUT_PUSHPULL}, - {PCR(PORT_D, PD_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_D, PD_BUTTON1), PAL_LOW, PAL_MODE_INPUT}, + {PCR(PORT_D, PD_BUTTON2), PAL_LOW, PAL_MODE_INPUT}, + {PCR(PORT_D, PD_BUTTON3), PAL_LOW, PAL_MODE_INPUT}, + {PCR(PORT_D, PD_BUTTON4), PAL_LOW, PAL_MODE_INPUT}, + {PCR(PORT_D, PD_LED1), PAL_HIGH, PAL_MODE_OUTPUT_PUSHPULL}, + {PCR(PORT_D, PD_LED2), PAL_HIGH, PAL_MODE_OUTPUT_PUSHPULL}, + {PCR(PORT_D, PD_LED3), PAL_HIGH, PAL_MODE_OUTPUT_PUSHPULL}, + {PCR(PORT_D, PD_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, }; /** * @brief PAL setup. */ -const PALConfig pal_default_config = { - PAL_MODE_UNCONNECTED, /* Default mode for all undefined pads. */ +const PALConfig pal_default_config = +{ + PAL_MODE_UNCONNECTED, spc_siu_init, spc_padsels_init }; @@ -63,5 +67,4 @@ void __early_init(void) { * Board-specific initialization code. */ void boardInit(void) { - } diff --git a/os/hal/boards/ST_EVB_SPC56EL/board.h b/os/hal/boards/ST_EVB_SPC56EL/board.h index d6bc39115..23815b747 100644 --- a/os/hal/boards/ST_EVB_SPC56EL/board.h +++ b/os/hal/boards/ST_EVB_SPC56EL/board.h @@ -18,14 +18,14 @@ #define _BOARD_H_ /* - * Setup for a generic SPC56ELxx proto board. + * Setup for a generic SPC56ELxx board. */ /* * Board identifiers. */ -#define BOARD_GENERIC_SPC56EL -#define BOARD_NAME "Generic SPC56ELxx" +#define BOARD_SPC56ELXX_EVB +#define BOARD_NAME "EVB with SPC56ELxx Mini Module" /* * Board frequencies. @@ -37,18 +37,16 @@ /* * I/O definitions. */ -#define PB_LIN0_TDX 2 -#define PB_LIN0_RDX 3 - -#define PD_BUTTON1 0 -#define PD_BUTTON2 1 -#define PD_BUTTON3 2 -#define PD_BUTTON4 3 - -#define PD_LED1 4 -#define PD_LED2 5 -#define PD_LED3 6 -#define PD_LED4 7 +#define PB_LIN0_TDX 2 +#define PB_LIN0_RDX 3 +#define PD_BUTTON1 0 +#define PD_BUTTON2 1 +#define PD_BUTTON3 2 +#define PD_BUTTON4 3 +#define PD_LED1 4 +#define PD_LED2 5 +#define PD_LED3 6 +#define PD_LED4 7 /* * Support macros. -- cgit v1.2.3