Skip to content

Commit

Permalink
Merge pull request #78 from mysterywolf/master
Browse files Browse the repository at this point in the history
fix:三字节读命令0x03,四字节读命令0x13,当命令为0x03需要加上0x10
  • Loading branch information
armink authored Dec 15, 2022
2 parents 9b956d4 + e815c98 commit 824a93d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sfud/src/sfud.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,12 @@ static void qspi_set_read_cmd_format(sfud_flash *flash, uint8_t ins, uint8_t ins
flash->read_cmd_format.instruction = ins;
flash->read_cmd_format.address_size = 24;
} else {
flash->read_cmd_format.instruction = ins + 1;
if(ins == SFUD_CMD_READ_DATA){
flash->read_cmd_format.instruction = ins + 0x10;
}
else{
flash->read_cmd_format.instruction = ins + 1;
}
flash->read_cmd_format.address_size = 32;
}

Expand Down

0 comments on commit 824a93d

Please sign in to comment.