sim: add new device with unequal slots
This device allows testing swap move with a primary slot that is one
sector larger than the secondary slot. No scratch was defined. Overwrite
upgrade could easily be made compatible as well, but for now leave it
as a disabled caps.
Signed-off-by: Fabio Utzig <utzig@apache.org>
diff --git a/sim/src/lib.rs b/sim/src/lib.rs
index ec8e5ed..93cdbfa 100644
--- a/sim/src/lib.rs
+++ b/sim/src/lib.rs
@@ -62,7 +62,10 @@
}
#[derive(Copy, Clone, Debug, Deserialize)]
-pub enum DeviceName { Stm32f4, K64f, K64fBig, K64fMulti, Nrf52840, Nrf52840SpiFlash, }
+pub enum DeviceName {
+ Stm32f4, K64f, K64fBig, K64fMulti, Nrf52840, Nrf52840SpiFlash,
+ Nrf52840UnequalSlots,
+}
pub static ALL_DEVICES: &'static [DeviceName] = &[
DeviceName::Stm32f4,
@@ -71,6 +74,7 @@
DeviceName::K64fMulti,
DeviceName::Nrf52840,
DeviceName::Nrf52840SpiFlash,
+ DeviceName::Nrf52840UnequalSlots,
];
impl fmt::Display for DeviceName {
@@ -82,6 +86,7 @@
DeviceName::K64fMulti => "k64fmulti",
DeviceName::Nrf52840 => "nrf52840",
DeviceName::Nrf52840SpiFlash => "Nrf52840SpiFlash",
+ DeviceName::Nrf52840UnequalSlots => "Nrf52840UnequalSlots",
};
f.write_str(name)
}