From 4a2b2769363a3ec43a31e3c96ac303d241f3fc5d Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 25 Mar 2013 11:11:08 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5505 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/SPC5xx/DSPI_v1/spi_lld.c | 4 ++-- os/hal/platforms/SPC5xx/DSPI_v1/spi_lld.h | 2 +- testhal/SPC563Mxx/SPI/main.c | 11 +---------- testhal/SPC563Mxx/SPI/mcuconf.h | 2 +- 4 files changed, 5 insertions(+), 14 deletions(-) diff --git a/os/hal/platforms/SPC5xx/DSPI_v1/spi_lld.c b/os/hal/platforms/SPC5xx/DSPI_v1/spi_lld.c index ac5f3377b..738457ac6 100644 --- a/os/hal/platforms/SPC5xx/DSPI_v1/spi_lld.c +++ b/os/hal/platforms/SPC5xx/DSPI_v1/spi_lld.c @@ -40,9 +40,9 @@ /*===========================================================================*/ /** - * @brief SPI1 driver identifier. + * @brief SPID1 driver identifier. */ -#if SPC5_SPI_USE_SPI1 || defined(__DOXYGEN__) +#if SPC5_SPI_USE_DSPI1 || defined(__DOXYGEN__) SPIDriver SPID1; #endif diff --git a/os/hal/platforms/SPC5xx/DSPI_v1/spi_lld.h b/os/hal/platforms/SPC5xx/DSPI_v1/spi_lld.h index 128b1382f..1c61d8f03 100644 --- a/os/hal/platforms/SPC5xx/DSPI_v1/spi_lld.h +++ b/os/hal/platforms/SPC5xx/DSPI_v1/spi_lld.h @@ -132,7 +132,7 @@ struct SPIDriver { /* External declarations. */ /*===========================================================================*/ -#if SPC5_SPI_USE_SPI1 && !defined(__DOXYGEN__) +#if SPC5_SPI_USE_DSPI1 && !defined(__DOXYGEN__) extern SPIDriver SPID1; #endif diff --git a/testhal/SPC563Mxx/SPI/main.c b/testhal/SPC563Mxx/SPI/main.c index ad38d01a6..b3a5eb524 100644 --- a/testhal/SPC563Mxx/SPI/main.c +++ b/testhal/SPC563Mxx/SPI/main.c @@ -100,17 +100,8 @@ int main(void) { chSysInit(); /* - * SPI2 I/O pins setup. + * SPI1 I/O pins setup. */ - palSetPadMode(GPIOB, 13, PAL_MODE_ALTERNATE(5) | - PAL_STM32_OSPEED_HIGHEST); /* New SCK. */ - palSetPadMode(GPIOB, 14, PAL_MODE_ALTERNATE(5) | - PAL_STM32_OSPEED_HIGHEST); /* New MISO. */ - palSetPadMode(GPIOB, 15, PAL_MODE_ALTERNATE(5) | - PAL_STM32_OSPEED_HIGHEST); /* New MOSI. */ - palSetPadMode(GPIOB, 12, PAL_MODE_OUTPUT_PUSHPULL | - PAL_STM32_OSPEED_HIGHEST); /* New CS. */ - palSetPad(GPIOB, 12); /* * Prepare transmit pattern. diff --git a/testhal/SPC563Mxx/SPI/mcuconf.h b/testhal/SPC563Mxx/SPI/mcuconf.h index 45501882b..eee35f514 100644 --- a/testhal/SPC563Mxx/SPI/mcuconf.h +++ b/testhal/SPC563Mxx/SPI/mcuconf.h @@ -84,4 +84,4 @@ /* * SPI driver system settings. */ -#define SPC5_SPI_USE_DSPI1 FALSE +#define SPC5_SPI_USE_DSPI1 TRUE -- cgit v1.2.3