diff options
author | Damien George <damien.p.george@gmail.com> | 2018-08-02 14:04:44 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-08-02 14:04:44 +1000 |
commit | da2d2b6d884201f2cbb23f74c6c5557e30fb1f14 (patch) | |
tree | 6b864f05d8d8d11cc6ae1b576f954cfd22c2038e /py | |
parent | 0c161691b490b885c40c96b34bbb13264e259dff (diff) | |
download | micropython-da2d2b6d884201f2cbb23f74c6c5557e30fb1f14.tar.gz micropython-da2d2b6d884201f2cbb23f74c6c5557e30fb1f14.zip |
py/mpconfig.h: Introduce MICROPY_DEBUG_PRINTER for debugging output.
This patch in effect renames MICROPY_DEBUG_PRINTER_DEST to
MICROPY_DEBUG_PRINTER, moving its default definition from
lib/utils/printf.c to py/mpconfig.h to make it official and documented, and
makes this macro a pointer rather than the actual mp_print_t struct. This
is done to get consistency with MICROPY_ERROR_PRINTER, and provide this
macro for use outside just lib/utils/printf.c.
Ports are updated to use the new macro name.
Diffstat (limited to 'py')
-rw-r--r-- | py/mpconfig.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h index 8b0f291cb0..6396850b38 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -366,6 +366,11 @@ #define MICROPY_MEM_STATS (0) #endif +// The mp_print_t printer used for debugging output +#ifndef MICROPY_DEBUG_PRINTER +#define MICROPY_DEBUG_PRINTER (&mp_plat_print) +#endif + // Whether to build functions that print debugging info: // mp_bytecode_print // mp_parse_node_print |