Merge pull request #1626 from armink/fix_sfud
[DeviceDriver][sfud] Fix block erase 0 byte issue when start address …
This commit is contained in:
commit
62c6205bc8
|
@ -76,6 +76,10 @@ static rt_err_t rt_sfud_control(rt_device_t dev, int cmd, void *args) {
|
|||
return -RT_ERROR;
|
||||
}
|
||||
|
||||
if (end_addr == start_addr) {
|
||||
end_addr ++;
|
||||
}
|
||||
|
||||
phy_start_addr = start_addr * rtt_dev->geometry.bytes_per_sector;
|
||||
phy_size = (end_addr - start_addr) * rtt_dev->geometry.bytes_per_sector;
|
||||
|
||||
|
|
Loading…
Reference in New Issue