aboutsummaryrefslogtreecommitdiffstats
path: root/boards
diff options
context:
space:
mode:
Diffstat (limited to 'boards')
-rw-r--r--boards/OLIMEX_STM32_P103/board.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/boards/OLIMEX_STM32_P103/board.c b/boards/OLIMEX_STM32_P103/board.c
index 92f1fe364..cdd45553c 100644
--- a/boards/OLIMEX_STM32_P103/board.c
+++ b/boards/OLIMEX_STM32_P103/board.c
@@ -47,6 +47,21 @@ void __early_init(void) {
stm32_clock_init();
}
+#if HAL_USE_MMC_SPI
+/* Board-related functions related to the MMC_SPI driver.*/
+bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) {
+
+ (void)mmcp;
+ return palReadPad(GPIOC, GPIOC_MMCCP);
+}
+
+bool_t mmc_lld_is_write_protected(MMCDriver *mmcp) {
+
+ (void)mmcp;
+ return !palReadPad(GPIOC, GPIOC_MMCWP);
+}
+#endif
+
/*
* Board-specific initialization code.
*/