mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 23:40:19 +08:00
mmcsd_sdio:Limit the use of sleep in mmcsd.
reference:https://github.com/apache/nuttx/pull/12971 Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
This commit is contained in:
+16
-12
@@ -98,18 +98,22 @@
|
|||||||
|
|
||||||
#define MMCSD_CAPACITY(b, s) ((s) >= 10 ? (b) << ((s) - 10) : (b) >> (10 - (s)))
|
#define MMCSD_CAPACITY(b, s) ((s) >= 10 ? (b) << ((s) - 10) : (b) >> (10 - (s)))
|
||||||
|
|
||||||
#define MMCSD_USLEEP(usec) \
|
#ifdef CONFIG_BOARD_COREDUMP_BLKDEV
|
||||||
do \
|
# define MMCSD_USLEEP(usec) \
|
||||||
{ \
|
do \
|
||||||
if (up_interrupt_context()) \
|
{ \
|
||||||
{ \
|
if (up_interrupt_context()) \
|
||||||
up_udelay(usec); \
|
{ \
|
||||||
} \
|
up_udelay(usec); \
|
||||||
else \
|
} \
|
||||||
{ \
|
else \
|
||||||
nxsig_usleep(usec); \
|
{ \
|
||||||
} \
|
nxsig_usleep(usec); \
|
||||||
} while (0)
|
} \
|
||||||
|
} while (0)
|
||||||
|
#else
|
||||||
|
# define MMCSD_USLEEP(usec) nxsig_usleep(usec)
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
|
|||||||
Reference in New Issue
Block a user