From f704e7f20e34debbe33c776beaf3ca1bf830aa4f Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 24 Mar 2014 12:23:37 +0000 Subject: stmhal: Improve REPL CTRL commands. --- stmhal/main.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'stmhal/main.c') diff --git a/stmhal/main.c b/stmhal/main.c index 0a7051269..4aa668a13 100644 --- a/stmhal/main.c +++ b/stmhal/main.c @@ -446,7 +446,19 @@ soft_reset: #endif #endif - pyexec_repl(); + // enter REPL + // REPL mode can change, or it can request a soft reset + for (;;) { + if (pyexec_mode_kind == PYEXEC_MODE_RAW_REPL) { + if (pyexec_raw_repl() != 0) { + break; + } + } else { + if (pyexec_friendly_repl() != 0) { + break; + } + } + } printf("PYB: sync filesystems\n"); storage_flush(); -- cgit v1.2.3