From 79dee07483097d4155e50f7b2db9cfdd97a524a1 Mon Sep 17 00:00:00 2001 From: yinshuqing Date: Thu, 11 Nov 2021 16:43:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=91=8A=E8=AD=A6=E6=B8=85?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yinshuqing --- model/storage/sdio_adapter.c | 9 +++++++-- platform/pwm/pwm_hi35xx.h | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/model/storage/sdio_adapter.c b/model/storage/sdio_adapter.c index 59fdba5..3f10341 100644 --- a/model/storage/sdio_adapter.c +++ b/model/storage/sdio_adapter.c @@ -33,6 +33,11 @@ #define MMC_SLOT_NUM 3 #define SDIO_RESCAN_WAIT_TIME 40 +enum SleepTime { + MS_10 = 10, /**< 10ms */ + MS_50 = 50, /**< 50ms */ +}; + struct mmc_host *himci_get_mmc_host(int slot); void hisi_sdio_rescan(int slot); @@ -457,7 +462,7 @@ static int32_t Hi35xxLinuxSdioRescan(struct MmcCntlr *cntlr) hisi_sdio_rescan(cntlr->index); while (rescanFinish == false && count < SDIO_RESCAN_WAIT_TIME) { - OsalMSleep(50); + OsalMSleep(MS_50); count++; rescanFinish = Hi35xxLinuxSdioRescanFinish(cntlr); } @@ -467,7 +472,7 @@ static int32_t Hi35xxLinuxSdioRescan(struct MmcCntlr *cntlr) return HDF_FAILURE; } - OsalMSleep(10); + OsalMSleep(MS_10); return HDF_SUCCESS; } diff --git a/platform/pwm/pwm_hi35xx.h b/platform/pwm/pwm_hi35xx.h index 7977201..c5c3f27 100644 --- a/platform/pwm/pwm_hi35xx.h +++ b/platform/pwm/pwm_hi35xx.h @@ -55,7 +55,7 @@ static inline void HiPwmDisable(struct HiPwmRegs *reg) if (reg == NULL) { return; } - reg->ctrl &= ~ 1; + reg->ctrl &= ~1; } static inline void HiPwmAlwaysOutput(struct HiPwmRegs *reg) -- Gitee