X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=src%2Fcommon%2Fmx25l.rs;h=6c28c5ae904b96dc37791d3dd25f1c1ffe06c3c2;hb=c42a04101a5635fb7557ebdf7b5c7f2dbcb12b54;hp=ecc42bacfe84b9228db2aea4c4eba02a894176b4;hpb=80382da44362f47107e5aab12a7e56f4cc011926;p=gps-watch.git diff --git a/src/common/mx25l.rs b/src/common/mx25l.rs index ecc42ba..6c28c5a 100644 --- a/src/common/mx25l.rs +++ b/src/common/mx25l.rs @@ -115,6 +115,8 @@ impl Mx25l { return Ok(()); } + self.write_enable(); + self.with_selected(|| { spi::tx8(spi::SPI0, Command::PP as u8); @@ -196,6 +198,10 @@ impl Storage for Mx25l { Ok(()) } + fn erase(&mut self, address: usize) -> Result<(), Error> { + self.erase_sector(address) + } + fn clear(&mut self) { self.erase_all(); }