diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-01-12 04:36:57 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-01-12 04:36:57 +0200 |
commit | 3f9f9cac75b8894dc4cc641e48778ad5cd9ac3bc (patch) | |
tree | 04facd1714e30dd0169ad1b262a5c5dcaa5cb7e9 /lib/mp-readline/readline.h | |
parent | 708574b0825149508ef49711869019fac49068d1 (diff) | |
download | micropython-3f9f9cac75b8894dc4cc641e48778ad5cd9ac3bc.tar.gz micropython-3f9f9cac75b8894dc4cc641e48778ad5cd9ac3bc.zip |
lib/mp-readline: Refactor to support coroutine/event-driven usage.
readline_process_char() can be fed character by character, for example,
received from external event loop. This will allow to integrate MicroPython
into cooperative multitasking systems.
Diffstat (limited to 'lib/mp-readline/readline.h')
-rw-r--r-- | lib/mp-readline/readline.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/mp-readline/readline.h b/lib/mp-readline/readline.h index d5ce4704ea..51ea4a56d4 100644 --- a/lib/mp-readline/readline.h +++ b/lib/mp-readline/readline.h @@ -32,3 +32,7 @@ void readline_init0(void); int readline(vstr_t *line, const char *prompt); + +void readline_init(vstr_t *line); +void readline_note_newline(); +int readline_process_char(int c); |