aboutsummaryrefslogtreecommitdiffstats
path: root/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f107_goldbull
diff options
context:
space:
mode:
Diffstat (limited to 'demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f107_goldbull')
-rw-r--r--demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f107_goldbull/chconf.h30
-rw-r--r--demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f107_goldbull/portab.c12
-rw-r--r--demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f107_goldbull/portab.h3
3 files changed, 38 insertions, 7 deletions
diff --git a/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f107_goldbull/chconf.h b/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f107_goldbull/chconf.h
index 6641b1397..384e03a78 100644
--- a/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f107_goldbull/chconf.h
+++ b/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f107_goldbull/chconf.h
@@ -391,7 +391,7 @@
*
* @note The default is @p FALSE.
*/
-#define CH_DBG_STATISTICS TRUE
+#define CH_DBG_STATISTICS FALSE
/**
* @brief Debug option, system state check.
@@ -400,7 +400,7 @@
*
* @note The default is @p FALSE.
*/
-#define CH_DBG_SYSTEM_STATE_CHECK TRUE
+#define CH_DBG_SYSTEM_STATE_CHECK FALSE
/**
* @brief Debug option, parameters checks.
@@ -409,7 +409,7 @@
*
* @note The default is @p FALSE.
*/
-#define CH_DBG_ENABLE_CHECKS TRUE
+#define CH_DBG_ENABLE_CHECKS FALSE
/**
* @brief Debug option, consistency checks.
@@ -419,7 +419,7 @@
*
* @note The default is @p FALSE.
*/
-#define CH_DBG_ENABLE_ASSERTS TRUE
+#define CH_DBG_ENABLE_ASSERTS FALSE
/**
* @brief Debug option, trace buffer.
@@ -427,7 +427,7 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
-#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_ALL
+#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
/**
* @brief Trace buffer entries.
@@ -446,7 +446,7 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
-#define CH_DBG_ENABLE_STACK_CHECK TRUE
+#define CH_DBG_ENABLE_STACK_CHECK FALSE
/**
* @brief Debug option, stacks initialization.
@@ -456,7 +456,7 @@
*
* @note The default is @p FALSE.
*/
-#define CH_DBG_FILL_THREADS TRUE
+#define CH_DBG_FILL_THREADS FALSE
/**
* @brief Debug option, threads profiling.
@@ -479,6 +479,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK(tp) { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
diff --git a/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f107_goldbull/portab.c b/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f107_goldbull/portab.c
index 4c54b2835..f7690df80 100644
--- a/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f107_goldbull/portab.c
+++ b/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f107_goldbull/portab.c
@@ -29,10 +29,22 @@
/* Module local definitions. */
/*===========================================================================*/
+/* Maximum speed SPI configuration (18MHz, CPHA=0, CPOL=0, MSb first).*/
+static const SPIConfig hs_spicfg = {NULL, IOPORT3, GPIOC_SPI3_SD_CS, 0, 0};
+
+/* Low speed SPI configuration (281.250kHz, CPHA=0, CPOL=0, MSb first).*/
+static const SPIConfig ls_spicfg = {NULL, IOPORT3, GPIOC_SPI3_SD_CS,
+ SPI_CR1_BR_2 | SPI_CR1_BR_1,
+ 0};
+
/*===========================================================================*/
/* Module exported variables. */
/*===========================================================================*/
+/* MMC/SD over SPI driver configuration.*/
+MMCConfig const portab_mmccfg = {&SPID3, &ls_spicfg, &hs_spicfg};
+MMCDriver MMCD1;
+
/*===========================================================================*/
/* Module local types. */
/*===========================================================================*/
diff --git a/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f107_goldbull/portab.h b/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f107_goldbull/portab.h
index 4322cedd1..a9ba34d7c 100644
--- a/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f107_goldbull/portab.h
+++ b/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f107_goldbull/portab.h
@@ -55,6 +55,9 @@
/* External declarations. */
/*===========================================================================*/
+extern const MMCConfig portab_mmccfg;
+extern MMCDriver MMCD1;
+
#ifdef __cplusplus
extern "C" {
#endif