Skip to content

Commit 05846ff

Browse files
authored
Merge pull request #8 from flit/use_sector_size_constant
Use the SECTOR_SIZE constant in erase_sector()
2 parents 9cf257f + 43a4944 commit 05846ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ impl FlashAlgo for RP2040Algo {
8080
}
8181

8282
fn erase_sector(&mut self, addr: u32) -> Result<(), ErrorCode> {
83-
(self.funcs.flash_range_erase)(addr - FLASH_BASE, 4096, BLOCK_SIZE, BLOCK_ERASE_CMD);
83+
(self.funcs.flash_range_erase)(addr - FLASH_BASE, SECTOR_SIZE, BLOCK_SIZE, BLOCK_ERASE_CMD);
8484
Ok(())
8585
}
8686

0 commit comments

Comments
 (0)