diff options
| author | kingofpayne <[email protected]> | 2024-09-16 22:07:56 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-09-16 22:07:56 +0200 |
| commit | 6d89f2729ab7a6ee3dd78ccaef1b16677b5a9eee (patch) | |
| tree | 1aa6772a246e777b6e21daefac131b03eacfbf62 /embassy-boot/src/lib.rs | |
| parent | ae8caf3f55d91579234f199458c369536fd39bb1 (diff) | |
boot: flash-erase-zero (#3344)
Allow compatibility with devices whose flash erase set bytes to 0x00
instead of 0xFF, using a new flash-erase-zero feature.
See issue #3342.
Diffstat (limited to 'embassy-boot/src/lib.rs')
| -rw-r--r-- | embassy-boot/src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/embassy-boot/src/lib.rs b/embassy-boot/src/lib.rs index b4f03e01e..8849055e8 100644 --- a/embassy-boot/src/lib.rs +++ b/embassy-boot/src/lib.rs | |||
| @@ -14,7 +14,11 @@ mod test_flash; | |||
| 14 | 14 | ||
| 15 | // The expected value of the flash after an erase | 15 | // The expected value of the flash after an erase |
| 16 | // TODO: Use the value provided by NorFlash when available | 16 | // TODO: Use the value provided by NorFlash when available |
| 17 | #[cfg(not(feature = "flash-erase-zero"))] | ||
| 17 | pub(crate) const STATE_ERASE_VALUE: u8 = 0xFF; | 18 | pub(crate) const STATE_ERASE_VALUE: u8 = 0xFF; |
| 19 | #[cfg(feature = "flash-erase-zero")] | ||
| 20 | pub(crate) const STATE_ERASE_VALUE: u8 = 0x00; | ||
| 21 | |||
| 18 | pub use boot_loader::{BootError, BootLoader, BootLoaderConfig}; | 22 | pub use boot_loader::{BootError, BootLoader, BootLoaderConfig}; |
| 19 | pub use firmware_updater::{ | 23 | pub use firmware_updater::{ |
| 20 | BlockingFirmwareState, BlockingFirmwareUpdater, FirmwareState, FirmwareUpdater, FirmwareUpdaterConfig, | 24 | BlockingFirmwareState, BlockingFirmwareUpdater, FirmwareState, FirmwareUpdater, FirmwareUpdaterConfig, |
