From 1e085a6548e1c49ed37a8412b5ec21e7c4fb3301 Mon Sep 17 00:00:00 2001 From: bunnie Date: Thu, 13 Nov 2025 22:19:13 +0800 Subject: [PATCH] don't make unknown flash a hard panic this allows an accidental baosec recognition on a dabao board to not brick the board --- libs/bao1x-hal/src/udma/spim.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/bao1x-hal/src/udma/spim.rs b/libs/bao1x-hal/src/udma/spim.rs index bd6e37533..346fb0537 100644 --- a/libs/bao1x-hal/src/udma/spim.rs +++ b/libs/bao1x-hal/src/udma/spim.rs @@ -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