diff options
author | Damien George <damien.p.george@gmail.com> | 2017-10-13 20:01:57 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-10-13 20:01:57 +1100 |
commit | 37282f8fc135a16ff36e2afe0de907cbde531ed0 (patch) | |
tree | daabbdc393b9870b5383aee08817df24a396ad98 /py/mpstate.h | |
parent | e39fcda8eb1bfc1ccc1660079189f9ae39392abe (diff) |
extmod/uos_dupterm: Update uos.dupterm() and helper funcs to have index.
The uos.dupterm() signature and behaviour is updated to reflect the latest
enhancements in the docs. It has minor backwards incompatibility in that
it no longer accepts zero arguments.
The dupterm_rx helper function is moved from esp8266 to extmod and
generalised to support multiple dupterm slots.
A port can specify multiple slots by defining the MICROPY_PY_OS_DUPTERM
config macro to an integer, being the number of slots it wants to have;
0 means to disable the dupterm feature altogether.
The unix and esp8266 ports are updated to work with the new interface and
are otherwise unchanged with respect to functionality.
Diffstat (limited to 'py/mpstate.h')
-rw-r--r-- | py/mpstate.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/mpstate.h b/py/mpstate.h index eca14a9e4..6a39ebdea 100644 --- a/py/mpstate.h +++ b/py/mpstate.h @@ -168,7 +168,7 @@ typedef struct _mp_state_vm_t { // root pointers for extmod #if MICROPY_PY_OS_DUPTERM - mp_obj_t term_obj; + mp_obj_t dupterm_objs[MICROPY_PY_OS_DUPTERM]; mp_obj_t dupterm_arr_obj; #endif |