aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg/stm32f107_goldbull/portab.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg/stm32f107_goldbull/portab.c')
-rw-r--r--lib/chibios/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg/stm32f107_goldbull/portab.c68
1 files changed, 68 insertions, 0 deletions
diff --git a/lib/chibios/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg/stm32f107_goldbull/portab.c b/lib/chibios/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg/stm32f107_goldbull/portab.c
new file mode 100644
index 000000000..7df0711e4
--- /dev/null
+++ b/lib/chibios/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg/stm32f107_goldbull/portab.c
@@ -0,0 +1,68 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/**
18 * @file portab.c
19 * @brief Application portability module code.
20 *
21 * @addtogroup application_portability
22 * @{
23 */
24
25#include "hal.h"
26#include "portab.h"
27
28/*===========================================================================*/
29/* Module local definitions. */
30/*===========================================================================*/
31
32/* Maximum speed SPI configuration (18MHz, CPHA=0, CPOL=0, MSb first).*/
33static const SPIConfig hs_spicfg = {false, NULL, IOPORT3, GPIOC_SPI3_SD_CS, 0, 0};
34
35/* Low speed SPI configuration (281.250kHz, CPHA=0, CPOL=0, MSb first).*/
36static const SPIConfig ls_spicfg = {false, NULL, IOPORT3, GPIOC_SPI3_SD_CS,
37 SPI_CR1_BR_2 | SPI_CR1_BR_1,
38 0};
39
40/*===========================================================================*/
41/* Module exported variables. */
42/*===========================================================================*/
43
44/* MMC/SD over SPI driver configuration.*/
45MMCConfig const portab_mmccfg = {&SPID3, &ls_spicfg, &hs_spicfg};
46MMCDriver MMCD1;
47
48/*===========================================================================*/
49/* Module local types. */
50/*===========================================================================*/
51
52/*===========================================================================*/
53/* Module local variables. */
54/*===========================================================================*/
55
56/*===========================================================================*/
57/* Module local functions. */
58/*===========================================================================*/
59
60/*===========================================================================*/
61/* Module exported functions. */
62/*===========================================================================*/
63
64void portab_setup(void) {
65
66}
67
68/** @} */