mirror of https://github.com/0Nera/BMOSP.git
Возврат текущего фреймбуффера ядром
This commit is contained in:
parent
f4d5158799
commit
b909a5f963
|
@ -64,7 +64,7 @@ typedef struct {
|
|||
typedef struct {
|
||||
uint64_t offset;
|
||||
void (*fb_printf)(char *str, ...); // Временная функция
|
||||
framebuffer_t *(*alloc_framebuffer)( );
|
||||
framebuffer_t (*alloc_framebuffer)( );
|
||||
void (*free_framebuffer)(framebuffer_t *frame);
|
||||
void *(*alloc)(uint64_t size);
|
||||
void (*free)(void *ptr);
|
||||
|
|
13
kernel/sys.c
13
kernel/sys.c
|
@ -12,11 +12,20 @@
|
|||
#include <sys.h>
|
||||
|
||||
module_info_t *current_module;
|
||||
extern uint32_t *fb_addr;
|
||||
extern uint32_t text_color;
|
||||
extern uint32_t background;
|
||||
extern uint64_t width;
|
||||
extern uint64_t height;
|
||||
extern uint64_t pitch;
|
||||
extern uint16_t bpp;
|
||||
|
||||
void sys_init( ) {}
|
||||
|
||||
static framebuffer_t *sys_alloc_framebuffer( ) {
|
||||
return (framebuffer_t *)0;
|
||||
static framebuffer_t sys_alloc_framebuffer( ) {
|
||||
return (framebuffer_t){
|
||||
.address = fb_addr, .width = width, .height = height, .pitch = pitch, .bpp = bpp, .reserved = 0
|
||||
};
|
||||
}
|
||||
|
||||
static void sys_free_framebuffer(framebuffer_t *frame) {
|
||||
|
|
|
@ -97,7 +97,7 @@ typedef struct {
|
|||
typedef struct {
|
||||
uint64_t offset;
|
||||
void (*fb_printf)(char *str, ...);
|
||||
framebuffer_t *(*alloc_framebuffer)( );
|
||||
framebuffer_t (*alloc_framebuffer)( );
|
||||
void (*free_framebuffer)(framebuffer_t *frame);
|
||||
void *(*alloc)(uint64_t size);
|
||||
void (*free)(void *ptr);
|
||||
|
|
Loading…
Reference in New Issue