From ff445708874117471d569e0eec368dded0747741 Mon Sep 17 00:00:00 2001 From: zhaoshaowei Date: Fri, 27 Dec 2019 16:41:47 +0800 Subject: [PATCH 1/2] [Kernel] fix typo in rt_thread_delay_util --- src/thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/thread.c b/src/thread.c index 3a3c97d0b6..74a573b78f 100644 --- a/src/thread.c +++ b/src/thread.c @@ -585,7 +585,7 @@ rt_err_t rt_thread_delay_until(rt_tick_t *tick, rt_tick_t inc_tick) return RT_EOK; } -RTM_EXPORT(rt_thread_delay_util); +RTM_EXPORT(rt_thread_delay_until); /** * This function will let current thread delay for some milliseconds. From 3ad6b30e18f9b0c8197178f32571ffd18183506d Mon Sep 17 00:00:00 2001 From: zhaoshaowei Date: Fri, 27 Dec 2019 16:52:52 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[componects]=20=E4=BF=AE=E5=A4=8D=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E5=8F=91=E7=8E=B0=E7=A6=81=E6=AD=A2=E5=86=99spi=20fla?= =?UTF-8?q?sh=E5=A4=B1=E8=B4=A5=E7=9A=84=E6=83=85=E5=BD=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `(register_status & SFUD_STATUS_REGISTER_WEL) == 1` 这个表达式始终为假 SFUD_STATUS_REGISTER_WEL = (1 << 1) --- components/drivers/spi/sfud/src/sfud.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/drivers/spi/sfud/src/sfud.c b/components/drivers/spi/sfud/src/sfud.c index f666b06806..e5b03131ff 100644 --- a/components/drivers/spi/sfud/src/sfud.c +++ b/components/drivers/spi/sfud/src/sfud.c @@ -897,7 +897,7 @@ static sfud_err set_write_enabled(const sfud_flash *flash, bool enabled) { if (enabled && (register_status & SFUD_STATUS_REGISTER_WEL) == 0) { SFUD_INFO("Error: Can't enable write status."); return SFUD_ERR_WRITE; - } else if (!enabled && (register_status & SFUD_STATUS_REGISTER_WEL) == 1) { + } else if (!enabled && (register_status & SFUD_STATUS_REGISTER_WEL) != 0) { SFUD_INFO("Error: Can't disable write status."); return SFUD_ERR_WRITE; }