10000 Add a flag to skip waiting for safe mode · domdfcoding/circuitpython@e4baefc · GitHub
[go: up one dir, main page]

Skip to content

Commit e4baefc

Browse files
committed
Add a flag to skip waiting for safe mode
Sometimes we don't want the delay in the device's startup. I used a simple flag, but now it also occurs to me that we could instead make the wait time a define, and set it to 0 to disable it.
1 parent 156dfad commit e4baefc

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

supervisor/shared/safe_mode.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ safe_mode_t wait_for_safe_mode_reset(void) {
6666
reset_reason != RESET_REASON_SOFTWARE) {
6767
return NO_SAFE_MODE;
6868
}
69+
#ifdef CIRCUITPY_SKIP_SAFE_MODE_WAIT
70+
return NO_SAFE_MODE;
71+
#endif
6972
port_set_saved_word(SAFE_MODE_DATA_GUARD | (MANUAL_SAFE_MODE << 8));
7073
// Wait for a while to allow for reset.
7174

0 commit comments

Comments
 (0)
0