projects
/
gps-watch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test: Verify Logger::list_recordings()'s behavior with empty storage.
[gps-watch.git]
/
src
/
common
/
mx25l.rs
diff --git
a/src/common/mx25l.rs
b/src/common/mx25l.rs
index ea2b8c1667372fe290f8c041d27566dfc9249d58..56c2d4489658e3f10b0f1354c0a70e4b435ebd4b 100644
(file)
--- a/
src/common/mx25l.rs
+++ b/
src/common/mx25l.rs
@@
-115,6
+115,8
@@
impl Mx25l {
return Ok(());
}
return Ok(());
}
+ self.write_enable();
+
self.with_selected(|| {
spi::tx8(spi::SPI0, Command::PP as u8);
self.with_selected(|| {
spi::tx8(spi::SPI0, Command::PP as u8);
@@
-157,6
+159,10
@@
impl Mx25l {
}
impl Storage for Mx25l {
}
impl Storage for Mx25l {
+ fn size(&self) -> usize {
+ 2 << 20
+ }
+
fn read(&self, address: usize, buffer: &mut [u8]) {
self.with_selected(|| {
spi::tx8(spi::SPI0, Command::READ as u8);
fn read(&self, address: usize, buffer: &mut [u8]) {
self.with_selected(|| {
spi::tx8(spi::SPI0, Command::READ as u8);