My Kernel v0.1.0
terminal.h
1#ifndef KERNEL_TERMINAL_H
2#define KERNEL_TERMINAL_H
3
4#include <utils/compiler.h>
5
6#include <stddef.h>
7#include <stdint.h>
8
9/* Hardware text mode color constants. */
10enum vga_color {
11 VGA_COLOR_BLACK = 0,
12 VGA_COLOR_BLUE = 1,
13 VGA_COLOR_GREEN = 2,
14 VGA_COLOR_CYAN = 3,
15 VGA_COLOR_RED = 4,
16 VGA_COLOR_MAGENTA = 5,
17 VGA_COLOR_BROWN = 6,
18 VGA_COLOR_LIGHT_GREY = 7,
19 VGA_COLOR_DARK_GREY = 8,
20 VGA_COLOR_LIGHT_BLUE = 9,
21 VGA_COLOR_LIGHT_GREEN = 10,
22 VGA_COLOR_LIGHT_CYAN = 11,
23 VGA_COLOR_LIGHT_RED = 12,
24 VGA_COLOR_LIGHT_MAGENTA = 13,
25 VGA_COLOR_LIGHT_BROWN = 14,
26 VGA_COLOR_WHITE = 15,
27};
28
29void tty_init(void);
30void tty_putchar(char c);
31void tty_write(const char *buffer, size_t size);
32void tty_puts(const char *buffer);
33
39void tty_set_color(uint8_t color);
40
41#endif /* KERNEL_TERMINAL_H */