mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-11 14:33:41 +00:00
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:
@@ -229,7 +229,7 @@ func (f flashBlockDevice) EraseBlocks(start, length int64) error {
|
|||||||
state := interrupt.Disable()
|
state := interrupt.Disable()
|
||||||
defer interrupt.Restore(state)
|
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
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user