diff options
author | Tyler Murphy <=> | 2023-07-17 19:34:52 -0400 |
---|---|---|
committer | Tyler Murphy <=> | 2023-07-17 19:34:52 -0400 |
commit | 7a912d1b668ab86ffe088eca3ac7e6f78a04a0c5 (patch) | |
tree | 4e86ff20e73171285156631db043e12aaf63bf04 /kernel/src/tty/cursor.c | |
parent | paging (diff) | |
download | finix-7a912d1b668ab86ffe088eca3ac7e6f78a04a0c5.tar.gz finix-7a912d1b668ab86ffe088eca3ac7e6f78a04a0c5.tar.bz2 finix-7a912d1b668ab86ffe088eca3ac7e6f78a04a0c5.zip |
refactoring
Diffstat (limited to 'kernel/src/tty/cursor.c')
-rw-r--r-- | kernel/src/tty/cursor.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/kernel/src/tty/cursor.c b/kernel/src/tty/cursor.c deleted file mode 100644 index 3a3888b..0000000 --- a/kernel/src/tty/cursor.c +++ /dev/null @@ -1,30 +0,0 @@ -#include <sys.h> - -#include "cursor.h" -#include "term.h" - -void cursor_enable(void) { - cursor_setsize(13, 16); -} - -void cursor_disable(void) { - outb(0x3D4, 0x0A); - outb(0x3D5, 0x20); -} - -void cursor_setsize(uint8_t start, uint8_t end) { - outb(0x3D4, 0x0A); - outb(0x3D5, (inb(0x3D5) & 0xC0) | start); - - outb(0x3D4, 0x0B); - outb(0x3D5, (inb(0x3D5) & 0xE0) | end); -} - -void cursor_setpos(uint8_t x, uint8_t y) { -; uint16_t pos = y * TERM_W + x; - - outb(0x3D4, 0x0F); - outb(0x3D5, (uint8_t) (pos & 0xFF)); - outb(0x3D4, 0x0E); - outb(0x3D5, (uint8_t) ((pos >> 8) & 0xFF)); -} |