Get Framebuffer and its modes

This commit is contained in:
Jozef Nagy 2025-04-20 19:17:03 +02:00
parent 42cc0d9f40
commit 5c682c4209
Signed by untrusted user who does not match committer: crz
GPG key ID: 459A4811CEAC7068
5 changed files with 129 additions and 14 deletions

View file

@ -0,0 +1,22 @@
#ifndef _UI_FRAMEBUFFER_H
#define _UI_FRAMEBUFFER_H
#include <stdint.h>
#include <stdbool.h>
enum fb_format {
FB_RGBA,
FB_BGRA
};
struct fb_mode {
uint32_t width;
uint32_t height;
uint8_t bpp;
uint32_t pitch;
int format;
};
bool get_framebuffer(uintptr_t *fb_addr, struct fb_mode **available_modes, int *total_modes, int *current_mode_index);
#endif /* _UI_FRAMEBUFFER_H */

6
boot/include/ui/ui.h Normal file
View file

@ -0,0 +1,6 @@
#ifndef _UI_UI_H
#define _UI_UI_H
void ui_init();
#endif /* _UI_UI_H */