diff options
Diffstat (limited to 'boards/OLIMEX_STM32_P407/board.c')
-rw-r--r-- | boards/OLIMEX_STM32_P407/board.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/boards/OLIMEX_STM32_P407/board.c b/boards/OLIMEX_STM32_P407/board.c index 59b6e9de6..2be03d673 100644 --- a/boards/OLIMEX_STM32_P407/board.c +++ b/boards/OLIMEX_STM32_P407/board.c @@ -51,6 +51,30 @@ void __early_init(void) { stm32_clock_init();
}
+#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
+/**
+ * @brief MMC_SPI card detection.
+ */
+bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) {
+ static bool_t last_status = FALSE;
+ (void)mmcp;
+
+ if ((palReadLatch(GPIOD) & PAL_PORT_BIT(GPIOD_SPI3_CS)) == 0)
+ return last_status;
+ return last_status = (bool_t)palReadPad(GPIOD, GPIOD_SPI3_CS);
+}
+
+/**
+ * @brief MMC_SPI card write protection detection.
+ */
+bool_t mmc_lld_is_write_protected(MMCDriver *mmcp) {
+
+ (void)mmcp;
+ /* TODO: Fill the implementation.*/
+ return FALSE;
+}
+#endif
+
/*
* Board-specific initialization code.
*/
|