aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_device.c')
-rw-r--r--os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_device.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_device.c b/os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_device.c
index 806fc4305..5861508b2 100644
--- a/os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_device.c
+++ b/os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_device.c
@@ -85,9 +85,10 @@ uint8_t sdmmc_device_lowlevelcfg(SdmmcDriver *driver)
/* Program capabilities for SDMMC0 */
sdmmc_set_capabilities((Sdmmc*) SDMMC0, caps0, CAPS0_MASK, 0, 0);
- /* Configure SDMMC0 pins */
#if 0
- /** SDMMC0 pin Card Detect (CD) */
+ /* Configure SDMMC0 pins */
+
+ /** SDMMC0 pin Card Detect (CD) */
palSetGroupMode(PIOA, (1u << PIOA_PIN13), 0U,
PAL_SAMA_FUNC_PERIPH_A | PAL_MODE_INPUT_PULLUP);
@@ -121,8 +122,8 @@ uint8_t sdmmc_device_lowlevelcfg(SdmmcDriver *driver)
/* Program capabilities for SDMMC1 */
sdmmc_set_capabilities(SDMMC1, caps0, CAPS0_MASK, 0, 0);
- /* Configure SDMMC1 pins */
#if 0
+ /* Configure SDMMC1 pins */
/** SDMMC1 pin Card Detect (CD) */
palSetGroupMode(PIOA, (1u << PIOA_PIN30), 0U,
PAL_SAMA_FUNC_PERIPH_E | PAL_MODE_INPUT_PULLUP);
@@ -138,6 +139,7 @@ uint8_t sdmmc_device_lowlevelcfg(SdmmcDriver *driver)
palSetGroupMode(PIOA, 0x003c0000, 0U,
PAL_SAMA_FUNC_PERIPH_E | PAL_MODE_INPUT_PULLUP);
#endif
+
res = 1;
}
break;
@@ -146,6 +148,7 @@ uint8_t sdmmc_device_lowlevelcfg(SdmmcDriver *driver)
break;
}
+
if (res) {
//check res
res = IS_CACHE_ALIGNED(driver->config->data_buf);