From 25f44c19f17085a09ad0f857c6ccc0d33d7c0344 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Tue, 27 Dec 2016 01:00:12 +0300 Subject: cc3200: Re-add support for UART REPL (MICROPY_STDIO_UART setting). UART REPL support was lost in os.dupterm() refactorings, etc. As os.dupterm() is there, implement UART REPL support at the high level - if MICROPY_STDIO_UART is set, make default boot.py contain os.dupterm() call for a UART. This means that changing MICROPY_STDIO_UART value will also require erasing flash on a module to force boot.py re-creation. --- py/misc.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'py') diff --git a/py/misc.h b/py/misc.h index 7584bc017..146b9a8e4 100644 --- a/py/misc.h +++ b/py/misc.h @@ -46,6 +46,10 @@ typedef unsigned int uint; #define MAX(x, y) ((x) > (y) ? (x) : (y)) #endif +// Classical double-indirection stringification of preprocessor macro's value +#define _MP_STRINGIFY(x) #x +#define MP_STRINGIFY(x) _MP_STRINGIFY(x) + /** memory allocation ******************************************/ // TODO make a lazy m_renew that can increase by a smaller amount than requested (but by at least 1 more element) -- cgit v1.2.3