diff --git a/include/lib/simplefb.h b/include/lib/simplefb.h index 56f0acb..78e4b38 100644 --- a/include/lib/simplefb.h +++ b/include/lib/simplefb.h @@ -17,6 +17,8 @@ typedef struct _color { unsigned char a; } color; +#define FB_TEXT_TOP_PADDING 5 + typedef enum { FB_FORMAT_RGB888, FB_FORMAT_ARGB8888, diff --git a/lib/debug/debug.c b/lib/debug/debug.c index ed5a682..38e54ce 100644 --- a/lib/debug/debug.c +++ b/lib/debug/debug.c @@ -67,7 +67,7 @@ static inline void uart_output(const char *prefix, const char *message) static inline void fb_output(const char *prefix, const char *message, color text_color) { #ifdef CONFIG_SIMPLE_FB - const int y_pos = 5; + const int y_pos = FB_TEXT_TOP_PADDING; const int prefix_width = strlen(prefix) * FONTW * get_font_scale_factor(); __simplefb_raw_print(prefix, 0, y_pos, text_color); diff --git a/lib/simplefb/simplefb.c b/lib/simplefb/simplefb.c index fd2c153..8d8a625 100644 --- a/lib/simplefb/simplefb.c +++ b/lib/simplefb/simplefb.c @@ -128,7 +128,7 @@ void __simplefb_raw_print(const char *text, int text_x, int text_y, if (current_y >= fb_info->height - SCALED_FONTH) { clean_fbmem((char*)fb_info->address, fb_info->width, fb_info->height, fb_info->stride); current_x = text_x; - current_y = 5; + current_y = FB_TEXT_TOP_PADDING; } int ix = font_index(text[i]);