ATM I use the following code to write debug output to the console:
Code: Select all
STATIC mp_obj_t mono_horiz_get_rect(const mp_obj_framebuf_t *fb, unsigned int x, unsigned int y, unsigned int w, unsigned int h) {
/*
Return the raw bytes of a rectangle given by its x ,y ,w ,h definition.
Caution! Bytes overlapping the left/right border will transferred completely.
The rectangle will be returned in the same order the buffer is aligned.
*/
mp_printf(&mp_plat_print,"get_rect=%d %d %d %d\n", x, y, w, h);
This is surely not the best way!
Is there a way to do it controlled by a micropython-DEBUG switch.
Any help appreciated,
Volker