summaryrefslogtreecommitdiff
path: root/software/mpu/board-F405/board.c
diff options
context:
space:
mode:
Diffstat (limited to 'software/mpu/board-F405/board.c')
-rw-r--r--software/mpu/board-F405/board.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/software/mpu/board-F405/board.c b/software/mpu/board-F405/board.c
index e66dd1c..0813bb6 100644
--- a/software/mpu/board-F405/board.c
+++ b/software/mpu/board-F405/board.c
@@ -61,3 +61,31 @@ void __early_init(void) {
*/
void boardInit(void) {
}
+
+#if HAL_USE_SDC
+/**
+ * @brief Insertion monitor function.
+ *
+ * @param[in] sdcp pointer to the @p SDCDriver object
+ *
+ * @notapi
+ */
+bool_t sdc_lld_is_card_inserted(SDCDriver *sdcp) {
+
+ (void)sdcp;
+ return !palReadPad(GPIOA, GPIOA_SDIO_CD);
+}
+
+/**
+ * @brief Protection detection.
+ *
+ * @param[in] sdcp pointer to the @p SDCDriver object
+ *
+ * @notapi
+ */
+bool_t sdc_lld_is_write_protected(SDCDriver *sdcp) {
+
+ (void)sdcp;
+ return !palReadPad(GPIOA, GPIOA_SDIO_WP);
+}
+#endif /* HAL_USE_SDC */