From ac27be4322458f206bfe175cfcb45b6217723117 Mon Sep 17 00:00:00 2001 From: isiora Date: Fri, 13 Apr 2018 14:09:09 +0000 Subject: Minor changes. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11936 110e8d01-0319-4d1e-a829-52ad28d1bb01 --- os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_device.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'os/hal/ports/SAMA/LLD') 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); -- cgit v1.2.3