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

@@ -0,0 +1,28 @@
#pragma once
#include <multiboot.h>
#include <framebuffer.h>
#define VGA_COLS 80
#define VGA_ROWS 24
#define VGA_SIZE (VGA_COLS*VGA_ROWS)
#define VGA_MEMORY P2V(0xB8000)
struct vga_cell {
uint8_t c;
uint8_t f;
}__attribute__((packed));
// drivers/terminal/terminal.c
void terminal_init();
void terminal_write(char c);
// drivers/terminal/vga.c
void vga_init();
void vga_movecursor(unsigned int cursor);
void vga_flush(struct vga_cell *buffer);
// drivers/terminal/fbterm.c
void fbterm_init(gfx_context *ctx);
void fbterm_movecursor(unsigned int cursor);
void fbterm_flush(struct vga_cell *buffer);