Skip to content

Commit 14cbf42

Browse files
authored
Merge pull request #2 from nsearchf/nsearchf-patch-2
[componects] 修复不能发现禁止写spi flash失败的情形
2 parents c232235 + 3ad6b30 commit 14cbf42

File tree

1 file changed

+1
-1
lines changed
  • components/drivers/spi/sfud/src

1 file changed

+1
-1
lines changed

components/drivers/spi/sfud/src/sfud.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ static sfud_err set_write_enabled(const sfud_flash *flash, bool enabled) {
897897
if (enabled && (register_status & SFUD_STATUS_REGISTER_WEL) == 0) {
898898
SFUD_INFO("Error: Can't enable write status.");
899899
return SFUD_ERR_WRITE;
900-
} else if (!enabled && (register_status & SFUD_STATUS_REGISTER_WEL) == 1) {
900+
} else if (!enabled && (register_status & SFUD_STATUS_REGISTER_WEL) != 0) {
901901
SFUD_INFO("Error: Can't disable write status.");
902902
return SFUD_ERR_WRITE;
903903
}

0 commit comments

Comments
 (0)