Refactoring debug terminal
This commit is contained in:
28
src/kernel/include/terminal.h
Normal file
28
src/kernel/include/terminal.h
Normal 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);
|
||||
Reference in New Issue
Block a user