From 6fd3079b30076770c96098929b58818fce2aedc1 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 4 Jun 2011 15:41:07 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3026 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/ARMCM3-STM32F103ZG-FATFS/main.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'demos') diff --git a/demos/ARMCM3-STM32F103ZG-FATFS/main.c b/demos/ARMCM3-STM32F103ZG-FATFS/main.c index 374cf7c4a..f8608ffeb 100644 --- a/demos/ARMCM3-STM32F103ZG-FATFS/main.c +++ b/demos/ARMCM3-STM32F103ZG-FATFS/main.c @@ -51,9 +51,22 @@ static EventSource inserted_event, removed_event; * * @notapi */ -static bool_t sdc_lld_is_card_inserted(SDCDriver *sdcp) { +bool_t sdc_lld_is_card_inserted(SDCDriver *sdcp) { - return TRUE; + return !palReadPad(GPIOF, GPIOF_SD_DETECT); +} + +/** + * @brief Protection detection. + * @note Not supported. + * + * @param[in] sdcp pointer to the @p SDCDriver object + * + * @notapi + */ +bool_t sdc_lld_is_write_protected(SDCDriver *sdcp) { + + return FALSE; } /** -- cgit v1.2.3