mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
Macro clock_systimer replaces direct access to g_system_timer variable
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3500 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -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)
|
||||
* exits the IDLE state. CMD55 is supported by SD V1.x and SD V2.x,
|
||||
* but not MMC
|
||||
*/
|
||||
|
||||
|
||||
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 = clock_systimer() - start;
|
||||
}
|
||||
while( elapsed < TICK_PER_SEC ); /* On successful reception while 'breaks', see above. */
|
||||
|
||||
Reference in New Issue
Block a user