Add SPI2 setup

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2114 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2009-10-02 02:23:11 +00:00
parent 006e07e772
commit 035724d0f8

View File

@ -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
}