From 7e8a2e8934e26d63e65e13f6da1c2f0866cf48da Mon Sep 17 00:00:00 2001 From: deadprogram Date: Sat, 6 May 2023 13:20:17 +0200 Subject: [PATCH] machine/rp2040: correct param for number of bytes to be erased by flash Signed-off-by: deadprogram --- src/machine/machine_rp2040_rom.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machine/machine_rp2040_rom.go b/src/machine/machine_rp2040_rom.go index 4a8af0f0..7944bacd 100644 --- a/src/machine/machine_rp2040_rom.go +++ b/src/machine/machine_rp2040_rom.go @@ -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 }