mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
fix #460 - prevent PDDB mount dialog from popping up during updates
check the newly-minted EC ready bit prior to running the PDDB mount handler.
This commit is contained in:
parent
6c39534a7b
commit
7da070f37c
1 changed files with 6 additions and 0 deletions
|
|
@ -672,6 +672,12 @@ fn wrapped_main() -> ! {
|
|||
// - code = 2 -> mount failed, because too many PINs were retried. `count` is the number of retries.
|
||||
// If we need more nuance out of this routine, consider creating a custom public enum type to help marshall this.
|
||||
Opcode::TryMount => xous::msg_blocking_scalar_unpack!(msg, _, _, _, _, {
|
||||
let llio = llio::Llio::new(&xns);
|
||||
while !llio.is_ec_ready() {
|
||||
// spin-wait while the EC is not ready -- so that a PDDB mount does not interfere with
|
||||
// on-going EC updates. Also causes the mount dialog to delay until the EC status has been checked.
|
||||
tt.sleep_ms(1000).ok();
|
||||
}
|
||||
if basis_cache.basis_count() > 0 {
|
||||
xous::return_scalar2(msg.sender, 0, 0).expect("couldn't return scalar");
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue