From 035724d0f8059d4860a4cf2434f8ac58763b0281 Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 2 Oct 2009 02:23:11 +0000 Subject: [PATCH] Add SPI2 setup git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2114 42af7a65-404d-4744-a932-0658087f49c3 --- configs/stm3210e-eval/src/up_spi.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/configs/stm3210e-eval/src/up_spi.c b/configs/stm3210e-eval/src/up_spi.c index 4173bbc6a62..75c27c40d31 100755 --- a/configs/stm3210e-eval/src/up_spi.c +++ b/configs/stm3210e-eval/src/up_spi.c @@ -93,7 +93,9 @@ void weak_function stm32_spiinitialize(void) { -#ifdef CONFIG_STM32_SPI1 + /* NOTE: Clocking for SPI1 and/or SPI2 was already provided in stm32_rcc.c */ + +#ifdef CONFIG_STM32_SPI1 /* Configure SPI1 alternate function pins */ stm32_configgpio(GPIO_SPI1_SCK); @@ -104,6 +106,14 @@ void weak_function stm32_spiinitialize(void) stm32_configgpio(GPIO_MMCSD_CS); stm32_configgpio(GPIO_FLASH_CS); +#endif +#ifdef CONFIG_STM32_SPI2 + /* Configure SPI1 alternate function pins */ + + stm32_configgpio(GPIO_SPI2_SCK); + stm32_configgpio(GPIO_SPI3_MISO); + stm32_configgpio(GPIO_SPI4_MOSI); + #endif }