tty.h (620B)
1 #ifndef _KERNEL_TTY_H_ 2 #define _KERNEL_TTY_H_ 3 4 #include <stddef.h> 5 6 enum vga_color: uint8_t { 7 VGA_BLACK = 0, 8 VGA_BLUE, 9 VGA_GREEN, 10 VGA_CYAN, 11 VGA_RED, 12 VGA_MAGENTA, 13 VGA_BROWN, 14 VGA_LIGHT_GREY, 15 VGA_DARK_GREY, 16 VGA_LIGHT_BLUE, 17 VGA_LIGHT_GREEN, 18 VGA_LIGHT_CYAN, 19 VGA_LIGHT_RED, 20 VGA_LIGHT_MAGENTA, 21 VGA_LIGHT_BROWN, 22 VGA_WHITE, 23 }; 24 25 void tty_clear(uint8_t, uint8_t); 26 void tty_set_color(uint8_t, uint8_t); 27 void tty_putc(char); 28 void tty_write(const char *); 29 void tty_curs_enable(uint8_t, uint8_t); 30 void tty_curs_disable(void); 31 void tty_curs_setpos(int, int); 32 uint16_t tty_curs_getpos(void); 33 34 #endif /* _KERNEL_TTY_H_ */