nrf5: Adding handling of CTRL+D to reset chip in main.c. Call to NVIC System Reset is issued.
This commit is contained in:
parent
82746d4549
commit
342ffadc59
@ -180,14 +180,21 @@ int main(int argc, char **argv) {
|
||||
|
||||
// Main script is finished, so now go into REPL mode.
|
||||
// The REPL mode can change, or it can request a soft reset.
|
||||
int ret_code = 0;
|
||||
|
||||
for (;;) {
|
||||
if (pyexec_friendly_repl() != 0) {
|
||||
ret_code = pyexec_friendly_repl();
|
||||
if (ret_code != 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
mp_deinit();
|
||||
|
||||
if (ret_code == PYEXEC_FORCED_EXIT) {
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user