aboutsummaryrefslogtreecommitdiff
path: root/extmod/misc.h
diff options
context:
space:
mode:
authorAndrew Leech <andrew@alelec.net>2019-02-21 05:23:41 +1100
committerDamien George <damien.p.george@gmail.com>2019-04-01 13:04:05 +1100
commit9d6f70f7154aa01a02d3de1c669241e3a1439218 (patch)
tree315110ddce74aadf6ff0e69dbe40e5ff983676b6 /extmod/misc.h
parent0fb15fc3f4b532faa3ca4fe49809f9d9e6c5cd53 (diff)
stm32: Make default USB_VCP stream go through uos.dupterm for main REPL.
Use uos.dupterm for REPL configuration of the main USB_VCP(0) stream on dupterm slot 1, if USB is enabled. This means dupterm can also be used to disable the boot REPL port if desired, via uos.dupterm(None, 1). For efficiency this adds a simple hook to the global uos.dupterm code to work with streams that are known to be native streams.
Diffstat (limited to 'extmod/misc.h')
-rw-r--r--extmod/misc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/extmod/misc.h b/extmod/misc.h
index d6f6d859c..dae6bec4a 100644
--- a/extmod/misc.h
+++ b/extmod/misc.h
@@ -35,6 +35,7 @@
MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(mp_uos_dupterm_obj);
#if MICROPY_PY_OS_DUPTERM
+bool mp_uos_dupterm_is_builtin_stream(mp_const_obj_t stream);
int mp_uos_dupterm_rx_chr(void);
void mp_uos_dupterm_tx_strn(const char *str, size_t len);
void mp_uos_deactivate(size_t dupterm_idx, const char *msg, mp_obj_t exc);