aboutsummaryrefslogtreecommitdiffstats
path: root/demos/STM32/RT-STM32-LWIP-FATFS-USB/main.c
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2017-12-01 09:18:49 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2017-12-01 09:18:49 +0000
commitccfdb3569b6570a3767585db5cd390562bd74e64 (patch)
tree21f99bcf30322ff21a9be64d73256f9cf52dbfbe /demos/STM32/RT-STM32-LWIP-FATFS-USB/main.c
parent363809df20139d147d4ab85ae906f36582b416a7 (diff)
downloadChibiOS-ccfdb3569b6570a3767585db5cd390562bd74e64.tar.gz
ChibiOS-ccfdb3569b6570a3767585db5cd390562bd74e64.tar.bz2
ChibiOS-ccfdb3569b6570a3767585db5cd390562bd74e64.zip
Few adjustments, moved some details from main.c to portab.c.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11094 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/STM32/RT-STM32-LWIP-FATFS-USB/main.c')
-rw-r--r--demos/STM32/RT-STM32-LWIP-FATFS-USB/main.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/demos/STM32/RT-STM32-LWIP-FATFS-USB/main.c b/demos/STM32/RT-STM32-LWIP-FATFS-USB/main.c
index e34fdb15c..cafb3dece 100644
--- a/demos/STM32/RT-STM32-LWIP-FATFS-USB/main.c
+++ b/demos/STM32/RT-STM32-LWIP-FATFS-USB/main.c
@@ -113,21 +113,6 @@ static FATFS SDC_FS;
/* FS mounted and ready.*/
static bool fs_ready = FALSE;
-#if !HAL_USE_SDC
-
-/* Maximum speed SPI configuration (18MHz, CPHA=0, CPOL=0, MSb first).*/
-static SPIConfig hs_spicfg = {NULL, IOPORT3, GPIOC_SPI3_SD_CS, 0, 0};
-
-/* Low speed SPI configuration (281.250kHz, CPHA=0, CPOL=0, MSb first).*/
-static SPIConfig ls_spicfg = {NULL, IOPORT3, GPIOC_SPI3_SD_CS,
- SPI_CR1_BR_2 | SPI_CR1_BR_1,
- 0};
-
-/* MMC/SD over SPI driver configuration.*/
-static MMCConfig mmccfg = {&SPID3, &ls_spicfg, &hs_spicfg};
-
-#endif
-
/* Generic large buffer.*/
static uint8_t fbuff[1024];
@@ -209,10 +194,6 @@ static const ShellConfig shell_cfg1 = {
static thread_t *shelltp = NULL;
-#if !HAL_USE_SDC
-MMCDriver MMCD1;
-#endif
-
/*
* Card insertion event.
*/
@@ -348,7 +329,7 @@ int main(void) {
*/
palSetPad(IOPORT3, GPIOC_SPI3_SD_CS);
mmcObjectInit(&MMCD1);
- mmcStart(&MMCD1, &mmccfg);
+ mmcStart(&MMCD1, &portab_mmccfg);
/*
* Activates the card insertion monitor.