machine/rp2040: correct param for number of bytes to be erased by flash

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram
2023-05-06 13:20:17 +02:00
committed by Ron Evans
parent e7363966a5
commit 7e8a2e8934
+1 -1
View File
@@ -229,7 +229,7 @@ func (f flashBlockDevice) EraseBlocks(start, length int64) error {
state := interrupt.Disable()
defer interrupt.Restore(state)
C.flash_erase_blocks(C.uint32_t(address), C.ulong(length))
C.flash_erase_blocks(C.uint32_t(address), C.ulong(length*f.EraseBlockSize()))
return nil
}