mirror of
https://github.com/ivoszbg/uniLoader.git
synced 2026-08-15 05:18:32 +00:00
lib: simplefb: drop passing fb base via func args
As we can make use of the video_info struct for base address, this argument is not required anymore and only breaks havoc on boards that don't set the CONFIG option.
This commit is contained in:
1 parent
eae304698b
commit
aa0163f2a5
3 files changed
+6
-6
No files matched your search
@@ -31,8 +31,8 @@ struct video_info {
|
||||
void *address;
|
||||
};
|
||||
|
||||
extern void __simplefb_raw_print(volatile char *fb, const char *text, int text_x,
|
||||
int text_y, color text_color);
|
||||
extern void __simplefb_raw_print(const char *text, int text_x, int text_y,
|
||||
color text_color);
|
||||
extern void simplefb_probe(void *data);
|
||||
|
||||
typedef struct _font_params {
|
||||
|
||||
+2
-2
@@ -71,8 +71,8 @@ static inline void fb_output(const char *prefix, const char *message, color text
|
||||
const int y_pos = 5;
|
||||
const int prefix_width = strlen(prefix) * SCALED_FONTW;
|
||||
|
||||
__simplefb_raw_print((char*)CONFIG_FRAMEBUFFER_BASE, prefix, 0, y_pos, text_color);
|
||||
__simplefb_raw_print((char*)CONFIG_FRAMEBUFFER_BASE, message, prefix_width, y_pos, gray);
|
||||
__simplefb_raw_print(prefix, 0, y_pos, text_color);
|
||||
__simplefb_raw_print(message, prefix_width, y_pos, gray);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ static void draw_pixel(volatile char *fb, int x, int y, int width, int stride,
|
||||
}
|
||||
}
|
||||
|
||||
void __simplefb_raw_print(volatile char *fb, const char *text, int text_x, int text_y,
|
||||
void __simplefb_raw_print(const char *text, int text_x, int text_y,
|
||||
color text_color)
|
||||
{
|
||||
int l = strlen(text);
|
||||
@@ -101,7 +101,7 @@ void __simplefb_raw_print(volatile char *fb, const char *text, int text_x, int t
|
||||
if (((b << x) & 0b10000000) > 0) {
|
||||
for (int dy = 0; dy < SCALE_FACTOR; dy++) {
|
||||
for (int dx = 0; dx < SCALE_FACTOR; dx++) {
|
||||
draw_pixel(fb, current_x + x * SCALE_FACTOR + dx,
|
||||
draw_pixel(fb_info->address, current_x + x * SCALE_FACTOR + dx,
|
||||
current_y + y * SCALE_FACTOR + dy,
|
||||
fb_info->width, fb_info->stride, text_color);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user