Skip to content

Commit

Permalink
Merge pull request #22 from 9names/remove_erase_all
Browse files Browse the repository at this point in the history
Remove erase_all function
  • Loading branch information
thejpster authored Feb 20, 2024
2 parents c29c100 + 4ea2ecf commit 35b9d6f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ version = "0.1.0"

[dependencies]
cortex-m = "0.7.0"
flash-algorithm = "0.4.0"
flash-algorithm = { version = "0.4.0", default-features = false, features = [
"panic-handler",
] }

# this lets you use `cargo fix`!
[[bin]]
Expand Down
1 change: 0 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@ cat <<EOF
pc_uninit: $(sym UnInit)
pc_program_page: $(sym ProgramPage)
pc_erase_sector: $(sym EraseSector)
pc_erase_all: $(sym EraseChip)
EOF
File renamed without changes.
5 changes: 0 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,6 @@ impl FlashAlgorithm for RP2040Algo {
Ok(Self { funcs })
}

fn erase_all(&mut self) -> Result<(), ErrorCode> {
// todo
Err(ErrorCode::new(0x70d0).unwrap())
}

fn erase_sector(&mut self, addr: u32) -> Result<(), ErrorCode> {
(self.funcs.flash_range_erase)(
addr - FlashDevice.dev_addr,
Expand Down

0 comments on commit 35b9d6f

Please sign in to comment.