diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2024-09-28 10:26:46 -0400 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2024-09-28 10:26:46 -0400 |
commit | ba5683581d00d9f02d470f4cde881293cc838a91 (patch) | |
tree | 772863e39677ae02b84a06f233d0a713d44d2f22 /kernel.cpp | |
parent | 376d7ec265085ae3a77664356a2ad35921cfccaf (diff) |
basic keyboard support
Diffstat (limited to 'kernel.cpp')
-rw-r--r-- | kernel.cpp | 49 |
1 files changed, 26 insertions, 23 deletions
@@ -1,10 +1,12 @@ #include "acpi.hpp" #include "gdt.hpp" #include "idt.hpp" +#include "keyboard.hpp" #include "memory.hpp" #include "multiboot.hpp" #include "pic.hpp" #include "pit.hpp" +#include "portio.hpp" #include "tasking.hpp" #include "vgaterminal.hpp" @@ -33,39 +35,40 @@ void kernel_main(void) pic_initialize(); idt_initialize(); pit_initialize(); + keyboard_initialize(); asm volatile("sti"); tasking_initialize(); term.write("Tasking enabled.\n"); - tasking_spawn([] { - for (;;) { - do pit_delay_ms(1); - while (termBusy); + //tasking_spawn([] { + // for (;;) { + // do pit_delay_ms(1); + // while (termBusy); - termBusy = true; - term.write('B'); - termBusy = false; - } - }, 256); + // termBusy = true; + // term.write('B'); + // termBusy = false; + // } + //}, 256); - tasking_spawn([] { - for (;;) { - do pit_delay_ms(1); - while (termBusy); + //tasking_spawn([] { + // for (;;) { + // do pit_delay_ms(1); + // while (termBusy); - termBusy = true; - term.write('C'); - termBusy = false; - } - }, 256); + // termBusy = true; + // term.write('C'); + // termBusy = false; + // } + //}, 256); for (;;) { - do pit_delay_ms(1); - while (termBusy); + pit_delay_ms(100); + //while (termBusy); - termBusy = true; - term.write('A'); - termBusy = false; + //termBusy = true; + //term.write('A'); + //termBusy = false; } } |