summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/pyexec.h
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 /stmhal/pyexec.h
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 'stmhal/pyexec.h')
-rw-r--r--stmhal/pyexec.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/stmhal/pyexec.h b/stmhal/pyexec.h
index e360273519..d01d505a78 100644
--- a/stmhal/pyexec.h
+++ b/stmhal/pyexec.h
@@ -32,9 +32,12 @@ typedef enum {
extern pyexec_mode_kind_t pyexec_mode_kind;
#define PYEXEC_FORCED_EXIT (0x100)
+#define PYEXEC_SWITCH_MODE (0x200)
int pyexec_raw_repl(void);
int pyexec_friendly_repl(void);
int pyexec_file(const char *filename);
+void pyexec_friendly_repl_init(void);
+int pyexec_friendly_repl_process_char(int c);
MP_DECLARE_CONST_FUN_OBJ(pyb_set_repl_info_obj);