finix/kernel/include/drivers/vga.h
2023-07-22 11:05:30 -04:00

34 lines
791 B
C

#pragma once
#include <stdbool.h>
#include <stdint.h>
enum vga_color {
VGA_BLACK = 0,
VGA_BLUE = 1,
VGA_GREEN = 2,
VGA_CYAN = 3,
VGA_RED = 4,
VGA_MAGENTA = 5,
VGA_BROWN = 6,
VGA_LIGHT_GREY = 7,
VGA_DARK_GREY = 8,
VGA_LIGHT_BLUE = 9,
VGA_LIGHT_GREEN = 10,
VGA_LIGHT_CYAN = 11,
VGA_LIGHT_RED = 12,
VGA_LIGHT_MAGENTA = 13,
VGA_LIGHT_BROWN = 14,
VGA_WHITE = 15,
};
#define VGA_TEXT_W 80
#define VGA_TEXT_H 25
void vgatext_write_char(char c, enum vga_color color, uint8_t x, uint8_t y);
void vgatext_write_data(uint16_t data, uint16_t index);
void vgatext_write_buf(const uint16_t *buffer);
void vgatext_cur_mov(uint8_t x, uint8_t y);
void vgatext_cur_resize(uint8_t start, uint8_t end);
void vgatext_cur_visible(bool visible);