From 69f211ae2c3f7a42d65e9f3bdb4e192016a53d94 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 2 Nov 2014 16:38:13 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7462 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/mmc_spi.c | 11 ++++++----- os/hal/src/sdc.c | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'os/hal/src') diff --git a/os/hal/src/mmc_spi.c b/os/hal/src/mmc_spi.c index ee33ee618..babbf80ad 100644 --- a/os/hal/src/mmc_spi.c +++ b/os/hal/src/mmc_spi.c @@ -169,7 +169,7 @@ static void wait(MMCDriver *mmcp) { break; #ifdef MMC_NICE_WAITING /* Trying to be nice with the other threads.*/ - chThdSleep(1); + osalThreadSleep(1); #endif } } @@ -348,7 +348,8 @@ static void sync(MMCDriver *mmcp) { if (buf[0] == 0xFF) break; #ifdef MMC_NICE_WAITING - chThdSleep(1); /* Trying to be nice with the other threads.*/ + /* Trying to be nice with the other threads.*/ + osalThreadSleep(1); #endif } spiUnselect(mmcp->config->spip); @@ -460,7 +461,7 @@ bool mmcConnect(MMCDriver *mmcp) { break; if (++i >= MMC_CMD0_RETRY) goto failed; - chThdSleepMilliseconds(10); + osalThreadSleepMilliseconds(10); } /* Try to detect if this is a high capacity card and switch to block @@ -480,7 +481,7 @@ bool mmcConnect(MMCDriver *mmcp) { if (++i >= MMC_ACMD41_RETRY) goto failed; - chThdSleepMilliseconds(10); + osalThreadSleepMilliseconds(10); } /* Execute dedicated read on OCR register */ @@ -501,7 +502,7 @@ bool mmcConnect(MMCDriver *mmcp) { goto failed; if (++i >= MMC_CMD1_RETRY) goto failed; - chThdSleepMilliseconds(10); + osalThreadSleepMilliseconds(10); } /* Initialization complete, full speed.*/ diff --git a/os/hal/src/sdc.c b/os/hal/src/sdc.c index ef96c6a9b..d8e469e82 100644 --- a/os/hal/src/sdc.c +++ b/os/hal/src/sdc.c @@ -86,7 +86,7 @@ bool _sdc_wait_for_transfer_state(SDCDriver *sdcp) { case MMCSD_STS_RCV: case MMCSD_STS_PRG: #if SDC_NICE_WAITING - osalThreadSleep(MS2ST(1)); + osalThreadSleep(OSAL_MS2ST(1)); #endif continue; default: @@ -262,7 +262,7 @@ bool sdcConnect(SDCDriver *sdcp) { } if (++i >= SDC_INIT_RETRY) goto failed; - osalThreadSleep(MS2ST(10)); + osalThreadSleep(OSAL_MS2ST(10)); } } -- cgit v1.2.3