You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
serial_write_compressed(translate("You requested starting safe mode by "));
110
-
serial_write(BOARD_USER_SAFE_MODE_ACTION);
111
-
serial_write_compressed(translate("\nTo exit, please reset the board without "));
112
-
serial_write(BOARD_USER_SAFE_MODE_ACTION);
113
-
serial_write("\n");
114
-
} else
115
-
#endif
116
-
switch (reason) {
117
-
caseMANUAL_SAFE_MODE:
118
-
serial_write_compressed(translate("CircuitPython is in safe mode because you pressed the reset button during boot. Press again to exit safe mode.\n"));
119
-
return;
120
-
casePROGRAMMATIC_SAFE_MODE:
121
-
serial_write_compressed(translate("The `microcontroller` module was used to boot into safe mode. Press reset to exit safe mode.\n"));
122
-
return;
123
-
default:
124
-
break;
125
-
}
126
116
127
-
serial_write_compressed(translate("You are in safe mode: something unanticipated happened.\n"));
128
-
switch (reason) {
129
-
caseBROWNOUT:
130
-
serial_write_compressed(translate("The microcontroller's power dipped. Make sure your power supply provides\nenough power for the whole circuit and press reset (after ejecting CIRCUITPY).\n"));
131
-
return;
132
-
caseHEAP_OVERWRITTEN:
133
-
serial_write_compressed(translate("The CircuitPython heap was corrupted because the stack was too small.\nPlease increase the stack size if you know how, or if not:"));
134
-
serial_write_compressed(FILE_AN_ISSUE);
135
-
return;
136
-
caseNO_HEAP:
137
-
serial_write_compressed(translate("CircuitPython was unable to allocate the heap.\n"));
138
-
serial_write_compressed(FILE_AN_ISSUE);
139
-
return;
140
-
default:
141
-
break;
142
-
}
117
+
switch (reason) {
118
+
caseUSER_SAFE_MODE:
119
+
#ifdefBOARD_USER_SAFE_MODE_ACTION
120
+
// Output a user safe mode string if it's set.
121
+
serial_write_compressed(translate("You requested starting safe mode by "));
serial_write_compressed(translate("CircuitPython is in safe mode because you pressed the reset button during boot. Press again to exit safe mode.\n"));
132
+
return;
133
+
casePROGRAMMATIC_SAFE_MODE:
134
+
serial_write_compressed(translate("The `microcontroller` module was used to boot into safe mode. Press reset to exit safe mode.\n"));
serial_write_compressed(translate("You are in safe mode: something unanticipated happened.\n"));
141
+
switch (reason) {
142
+
caseBROWNOUT:
143
+
serial_write_compressed(translate("The microcontroller's power dipped. Make sure your power supply provides\nenough power for the whole circuit and press reset (after ejecting CIRCUITPY).\n"));
144
+
return;
145
+
caseHEAP_OVERWRITTEN:
146
+
serial_write_compressed(translate("The CircuitPython heap was corrupted because the stack was too small.\nPlease increase the stack size if you know how, or if not:"));
147
+
serial_write_compressed(FILE_AN_ISSUE);
148
+
return;
149
+
caseNO_HEAP:
150
+
serial_write_compressed(translate("CircuitPython was unable to allocate the heap.\n"));
0 commit comments