diff options
| author | Scott Shawcroft <scott@chickadee.tech> | 2016-10-25 14:27:59 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott@chickadee.tech> | 2016-10-25 18:36:37 -0700 |
| commit | d189a3f3cf1b9aaaccf0996e8846aabe6e70cb4a (patch) | |
| tree | 079bfb21ec2d46e60d22ba5bcca0e6e5f6f94574 /lib | |
| parent | 614c1fdba2aca393e6769221cf8d8b55ee3464fe (diff) | |
atmel-samd: Support auto-reset based on USB write activity.
It will soft-reboot micropython after a burst of writes to the
file system. This means that after you save files on your computer
they will be automatically rerun.
This can be disabled in the build by unsetting AUTORESET_TIMER in
mpconfigboard.h.
Using the REPL will also prevent the soft resets until you reset
with CTRL-D manually.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/mp-readline/readline.h | 2 | ||||
| -rw-r--r-- | lib/utils/pyexec.c | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/mp-readline/readline.h b/lib/mp-readline/readline.h index f73934d23..ffb0d0e1c 100644 --- a/lib/mp-readline/readline.h +++ b/lib/mp-readline/readline.h @@ -24,6 +24,8 @@ * THE SOFTWARE. */ +#include "py/misc.h" + #define CHAR_CTRL_A (1) #define CHAR_CTRL_B (2) #define CHAR_CTRL_C (3) diff --git a/lib/utils/pyexec.c b/lib/utils/pyexec.c index f9bbf68a1..ce68e40b3 100644 --- a/lib/utils/pyexec.c +++ b/lib/utils/pyexec.c @@ -226,6 +226,7 @@ STATIC int pyexec_friendly_repl_process_char(int c) { } else if (ret == CHAR_CTRL_B) { // reset friendly REPL mp_hal_stdout_tx_str("\r\n"); + mp_hal_stdout_tx_str("\r\n"); mp_hal_stdout_tx_str("Adafruit MicroPython " MICROPY_GIT_TAG " on " MICROPY_BUILD_DATE "; " MICROPY_HW_BOARD_NAME " with " MICROPY_HW_MCU_NAME "\r\n"); // mp_hal_stdout_tx_str("Type \"help()\" for more information.\r\n"); goto input_restart; |
