diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-10-02 02:23:11 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-10-02 02:23:11 +0000 |
commit | 0fcfc7b1a0f67eda8bdaade6e215030f439397bf (patch) | |
tree | 8ab82f7c09652c543bb1e1f8013398950cbec52b /nuttx/configs/stm3210e-eval/src/up_spi.c | |
parent | be9f4d364aeee6344568f4806567fcca1169c068 (diff) | |
download | px4-nuttx-0fcfc7b1a0f67eda8bdaade6e215030f439397bf.tar.gz px4-nuttx-0fcfc7b1a0f67eda8bdaade6e215030f439397bf.tar.bz2 px4-nuttx-0fcfc7b1a0f67eda8bdaade6e215030f439397bf.zip |
Add SPI2 setup
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2114 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/stm3210e-eval/src/up_spi.c')
-rwxr-xr-x | nuttx/configs/stm3210e-eval/src/up_spi.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/nuttx/configs/stm3210e-eval/src/up_spi.c b/nuttx/configs/stm3210e-eval/src/up_spi.c index 4173bbc6a..75c27c40d 100755 --- a/nuttx/configs/stm3210e-eval/src/up_spi.c +++ b/nuttx/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
}
|