summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-01-15 10:46:27 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-01-16 01:30:42 +0200
commit87bc8e2b3d66d3e87c2d01a7b3107a8ecce2a07f (patch)
tree9ea31793d5ea1714dc82854d760070220a90d1c0 /py
parentc6b8750c143b21e797ace233a92e476f8ce798e0 (diff)
downloadmicropython-87bc8e2b3d66d3e87c2d01a7b3107a8ecce2a07f.tar.gz
micropython-87bc8e2b3d66d3e87c2d01a7b3107a8ecce2a07f.zip
pyexec: Add event-driven variant pyexec_friendly_repl().
pyexec_friendly_repl_process_char() and friends, useful for ports which integrate into existing cooperative multitasking system. Unlike readline() refactor before, this was implemented in less formal, trial&error process, minor functionality regressions are still known (like soft&hard reset support). So, original loop-based pyexec_friendly_repl() is left intact, specific implementation selectable by config setting.
Diffstat (limited to 'py')
-rw-r--r--py/mpconfig.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 5718ffacbc..eb39d54c4d 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -235,6 +235,11 @@
#define MICROPY_HELPER_REPL (0)
#endif
+// Whether port requires event-driven REPL functions
+#ifndef MICROPY_REPL_EVENT_DRIVEN
+#define MICROPY_REPL_EVENT_DRIVEN (0)
+#endif
+
// Whether to include lexer helper function for unix
#ifndef MICROPY_HELPER_LEXER_UNIX
#define MICROPY_HELPER_LEXER_UNIX (0)