shared/runtime: Use mp_printf consistently, instead of printf.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
31139b437a
commit
1978b838b7
|
@ -81,8 +81,8 @@ void mp_irq_handler(mp_irq_obj_t *self) {
|
||||||
// Uncaught exception; disable the callback so that it doesn't run again
|
// Uncaught exception; disable the callback so that it doesn't run again
|
||||||
self->methods->trigger(self->parent, 0);
|
self->methods->trigger(self->parent, 0);
|
||||||
self->handler = mp_const_none;
|
self->handler = mp_const_none;
|
||||||
printf("Uncaught exception in IRQ callback handler\n");
|
mp_printf(MICROPY_ERROR_PRINTER, "Uncaught exception in IRQ callback handler\n");
|
||||||
mp_obj_print_exception(&mp_plat_print, MP_OBJ_FROM_PTR(nlr.ret_val));
|
mp_obj_print_exception(MICROPY_ERROR_PRINTER, MP_OBJ_FROM_PTR(nlr.ret_val));
|
||||||
}
|
}
|
||||||
gc_unlock();
|
gc_unlock();
|
||||||
mp_sched_unlock();
|
mp_sched_unlock();
|
||||||
|
|
|
@ -154,12 +154,12 @@ STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input
|
||||||
// display debugging info if wanted
|
// display debugging info if wanted
|
||||||
if ((exec_flags & EXEC_FLAG_ALLOW_DEBUGGING) && repl_display_debugging_info) {
|
if ((exec_flags & EXEC_FLAG_ALLOW_DEBUGGING) && repl_display_debugging_info) {
|
||||||
mp_uint_t ticks = mp_hal_ticks_ms() - start; // TODO implement a function that does this properly
|
mp_uint_t ticks = mp_hal_ticks_ms() - start; // TODO implement a function that does this properly
|
||||||
printf("took " UINT_FMT " ms\n", ticks);
|
mp_printf(&mp_plat_print, "took " UINT_FMT " ms\n", ticks);
|
||||||
// qstr info
|
// qstr info
|
||||||
{
|
{
|
||||||
size_t n_pool, n_qstr, n_str_data_bytes, n_total_bytes;
|
size_t n_pool, n_qstr, n_str_data_bytes, n_total_bytes;
|
||||||
qstr_pool_info(&n_pool, &n_qstr, &n_str_data_bytes, &n_total_bytes);
|
qstr_pool_info(&n_pool, &n_qstr, &n_str_data_bytes, &n_total_bytes);
|
||||||
printf("qstr:\n n_pool=%u\n n_qstr=%u\n "
|
mp_printf(&mp_plat_print, "qstr:\n n_pool=%u\n n_qstr=%u\n "
|
||||||
"n_str_data_bytes=%u\n n_total_bytes=%u\n",
|
"n_str_data_bytes=%u\n n_total_bytes=%u\n",
|
||||||
(unsigned)n_pool, (unsigned)n_qstr, (unsigned)n_str_data_bytes, (unsigned)n_total_bytes);
|
(unsigned)n_pool, (unsigned)n_qstr, (unsigned)n_str_data_bytes, (unsigned)n_total_bytes);
|
||||||
}
|
}
|
||||||
|
@ -713,7 +713,7 @@ int pyexec_frozen_module(const char *name) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
printf("could not find module '%s'\n", name);
|
mp_printf(MICROPY_ERROR_PRINTER, "could not find module '%s'\n", name);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue