summaryrefslogtreecommitdiff
path: root/kernel/src/arch/x86_64/interrupts/pit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/src/arch/x86_64/interrupts/pit.cpp')
-rw-r--r--kernel/src/arch/x86_64/interrupts/pit.cpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/kernel/src/arch/x86_64/interrupts/pit.cpp b/kernel/src/arch/x86_64/interrupts/pit.cpp
deleted file mode 100644
index 5154537..0000000
--- a/kernel/src/arch/x86_64/interrupts/pit.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-
-#include <cstdint>
-#include <arch/x86_64/interrupts/pic.hpp>
-#include <arch/x86_64/interrupts/irq.hpp>
-#include <arch/x86_64/interrupts/pit.hpp>
-#include <drivers/hpet.hpp>
-
-using namespace arch::x86_64::interrupts;
-
-std::uint64_t pit_counter = 0;
-
-void __pit_int_handler(void *arg) {
- pit_counter++;
-}
-
-void arch::x86_64::interrupts::pit::init() {
- drivers::io io;
- std::uint8_t entry = irq::create(0,IRQ_TYPE_LEGACY,__pit_int_handler,0,0);
- std::uint32_t div = PIT_FREQUENCY / 1000;
- io.outb(0x43, 0x36);
- io.outb(0x40,div & 0xFF);
- io.outb(0x40,(div >> 8) & 0xFF);
-
- pic::clear(0);
-
-}
-
-/* idk why but pit sleep is broken on modern hw, redirect to hpet */
-void arch::x86_64::interrupts::pit::sleep(std::uint32_t ms) {
- drivers::hpet::sleep(ms);
-} \ No newline at end of file