don't make unknown flash a hard panic

this allows an accidental baosec recognition on a dabao board
to not brick the board
This commit is contained in:
bunnie 2025-11-13 22:19:13 +08:00
parent 6f65959adb
commit 1e085a6548

View file

@ -1325,7 +1325,10 @@ impl Spim {
let qe_set = match self.command_set {
Some(CommandSet::Macronix) => 0b0100_0000 & sr != 0,
Some(CommandSet::Xtx) => 0b10_0000_0000 & sr != 0,
None => panic!("Attempting to set QE on unknown flash type"),
None => {
crate::println!("Can't set QE on unknown flash type");
return;
}
};
if qe_set {
// nothing to do, it's already set