summaryrefslogtreecommitdiff
path: root/extmod/misc.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-10-13 20:01:57 +1100
committerDamien George <damien.p.george@gmail.com>2017-10-13 20:01:57 +1100
commit37282f8fc135a16ff36e2afe0de907cbde531ed0 (patch)
treedaabbdc393b9870b5383aee08817df24a396ad98 /extmod/misc.h
parente39fcda8eb1bfc1ccc1660079189f9ae39392abe (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 'extmod/misc.h')
-rw-r--r--extmod/misc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/extmod/misc.h b/extmod/misc.h
index 6c13592c7..d6f6d859c 100644
--- a/extmod/misc.h
+++ b/extmod/misc.h
@@ -35,8 +35,9 @@
MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(mp_uos_dupterm_obj);
#if MICROPY_PY_OS_DUPTERM
+int mp_uos_dupterm_rx_chr(void);
void mp_uos_dupterm_tx_strn(const char *str, size_t len);
-void mp_uos_deactivate(const char *msg, mp_obj_t exc);
+void mp_uos_deactivate(size_t dupterm_idx, const char *msg, mp_obj_t exc);
#else
#define mp_uos_dupterm_tx_strn(s, l)
#endif