mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-20 09:28:49 +08:00
Merge pull request #2 from nsearchf/nsearchf-patch-2
[componects] 修复不能发现禁止写spi flash失败的情形
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user