Refactoring debug terminal

This commit is contained in:
2022-01-08 23:09:52 +01:00
parent a09c160bcb
commit 38181eb728
14 changed files with 198 additions and 162 deletions

View File

@@ -1,6 +1,7 @@
#pragma once
#include <stdint.h>
#include <stddef.h>
#include <multiboot.h>
typedef struct {
uint32_t width;
@@ -12,9 +13,11 @@ typedef struct {
size_t size;
} gfx_context;
extern gfx_context kernel_fb;
#define RGB(r, g, b) (((uint32_t) (r<<16) + (g<<8) + (b)))
void putpixel(gfx_context *ctx, uint64_t x, uint64_t y, uint32_t clr);
gfx_context *make_subarea(gfx_context *ctx, uint64_t x, uint64_t y, uint64_t width, uint64_t height);
gfx_context *framebuffer_make_subcontext(gfx_context *ctx, uint64_t x, uint64_t y, uint64_t width, uint64_t height);
void drawCharacter(gfx_context *ctx, uint64_t x, uint64_t y, uint32_t clr_fg, uint32_t clr_bg, char c);
void framebuffer_init(struct fbinfo *fbinfo);