summaryrefslogtreecommitdiffstats
path: root/ape/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'ape/main.c')
-rw-r--r--ape/main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ape/main.c b/ape/main.c
index 16cca64..2146224 100644
--- a/ape/main.c
+++ b/ape/main.c
@@ -327,6 +327,16 @@ void __attribute__((noreturn)) loaderLoop(void)
}
}
}
+ else if (!Network_checkEnableState(gPort))
+ {
+ printf("APE mode change, resetting.\n");
+ wait_for_all_rx();
+ RMU_init();
+ NCSI_reload(ALWAYS_RESET);
+
+ // Update host state to make sure we don't reset twice if it's changed.
+ host_state = SHM.HostDriverState.bits.State;
+ }
Network_checkPortState(gPort);
}
OpenPOWER on IntegriCloud