Get Framebuffer and its modes
This commit is contained in:
parent
42cc0d9f40
commit
5c682c4209
5 changed files with 129 additions and 14 deletions
22
boot/include/ui/framebuffer.h
Normal file
22
boot/include/ui/framebuffer.h
Normal 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
6
boot/include/ui/ui.h
Normal file
|
@ -0,0 +1,6 @@
|
|||
#ifndef _UI_UI_H
|
||||
#define _UI_UI_H
|
||||
|
||||
void ui_init();
|
||||
|
||||
#endif /* _UI_UI_H */
|
Loading…
Add table
Add a link
Reference in a new issue