28 lines
617 B
C
28 lines
617 B
C
#pragma once
|
|
#include <mittos/graphics.h>
|
|
#include <multiboot.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();
|
|
|
|
// drivers/terminal/vga.c
|
|
void vga_init();
|
|
void vga_movecursor(unsigned int cursor);
|
|
void vga_flush(struct vga_cell *buffer);
|
|
|
|
// drivers/terminal/fbterm.c
|
|
extern gfx_context kernel_fb;
|
|
void fbterm_init(struct fbinfo *fbinfo);
|
|
void fbterm_movecursor(unsigned int cursor);
|
|
void fbterm_flush(struct vga_cell *buffer); |