diff options
Diffstat (limited to 'nuttx/drivers/mmcsd')
-rw-r--r-- | nuttx/drivers/mmcsd/mmcsd_sdio.c | 8 | ||||
-rw-r--r-- | nuttx/drivers/mmcsd/mmcsd_spi.c | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/nuttx/drivers/mmcsd/mmcsd_sdio.c b/nuttx/drivers/mmcsd/mmcsd_sdio.c index 28bbe08a3..a37008614 100644 --- a/nuttx/drivers/mmcsd/mmcsd_sdio.c +++ b/nuttx/drivers/mmcsd/mmcsd_sdio.c @@ -1095,7 +1095,7 @@ static int mmcsd_transferready(FAR struct mmcsd_state_s *priv) * the TRANSFER state when the card completes the WRITE operation. */ - starttime = g_system_timer; + starttime = clock_systimer(); do { /* Get the current R1 status from the card */ @@ -1138,7 +1138,7 @@ static int mmcsd_transferready(FAR struct mmcsd_state_s *priv) * time... we can't stay in this loop forever! */ - elapsed = g_system_timer - starttime; + elapsed = clock_systimer() - starttime; } while (elapsed < TICK_PER_SEC); return -ETIMEDOUT; @@ -2476,7 +2476,7 @@ static int mmcsd_cardidentify(FAR struct mmcsd_state_s *priv) * but not MMC */ - start = g_system_timer; + start = clock_systimer(); elapsed = 0; do { @@ -2620,7 +2620,7 @@ static int mmcsd_cardidentify(FAR struct mmcsd_state_s *priv) #endif /* Check the elapsed time. We won't keep trying this forever! */ - elapsed = g_system_timer - start; + elapsed = clock_systimer() - start; } while( elapsed < TICK_PER_SEC ); /* On successful reception while 'breaks', see above. */ diff --git a/nuttx/drivers/mmcsd/mmcsd_spi.c b/nuttx/drivers/mmcsd/mmcsd_spi.c index 93fd5dcab..b5f5829a2 100644 --- a/nuttx/drivers/mmcsd/mmcsd_spi.c +++ b/nuttx/drivers/mmcsd/mmcsd_spi.c @@ -1,7 +1,7 @@ /**************************************************************************** * drivers/mmcsd/mmcsd_spi.c * - * Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2010, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -122,8 +122,8 @@ #define MMCSD_DELAY_1SEC (CLK_TCK + 1) #define MMCSD_DELAY_10SEC (10 * CLK_TCK + 1) -#define ELAPSED_TIME(t) (g_system_timer-(t)) -#define START_TIME (g_system_timer) +#define ELAPSED_TIME(t) (clock_systimer()-(t)) +#define START_TIME (clock_systimer()) /* SD read timeout: ~100msec, Write Time out ~250ms. Units of clock ticks */ |