feature: functional shell with help and merdella commands

TOOD: reboot, poweroff, echo, color
This commit is contained in:
2024-09-10 20:03:33 +02:00
parent 232b19666a
commit 15bdb4743a
8 changed files with 232 additions and 19 deletions

View File

@ -1,5 +1,6 @@
#pragma once
#include "keyboard.h"
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
@ -14,6 +15,7 @@ struct screen {
size_t column;
uint8_t color;
uint16_t buffer[VGA_WIDTH * VGA_HEIGHT];
char line[256];
};
enum vga_color {
@ -35,13 +37,16 @@ enum vga_color {
VGA_COLOR_WHITE = 15,
};
enum cursor_direction { LEFT, RIGHT, UP, DOWN };
void terminal_initialize(void);
void terminal_setcolor(uint8_t color);
void terminal_putentryat(char c, uint8_t color, size_t x, size_t y);
int terminal_putchar(char c);
int terminal_write(const char *data, size_t size);
int terminal_writestring(const char *data);
int terminal_writelong(long number);
void terminal_set_screen(int pos);
uint8_t terminal_getkey(void);
struct key_event terminal_getkey(void);
void update_cursor(void);
void move_cursor(int direction);
struct screen *get_screen(void);