summaryrefslogtreecommitdiff
path: root/kernel/include
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/include')
-rw-r--r--kernel/include/comus/drivers/pit.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/kernel/include/comus/drivers/pit.h b/kernel/include/comus/drivers/pit.h
new file mode 100644
index 0000000..a7a111d
--- /dev/null
+++ b/kernel/include/comus/drivers/pit.h
@@ -0,0 +1,21 @@
+/**
+ * @file pit.h
+ *
+ * @author Freya Murphy <freya@freyacat.org>
+ *
+ * Programmable Interrupt Timer
+ */
+
+#ifndef PIT_H_
+#define PIT_H_
+
+#include <stdint.h>
+
+// how many time the pit has ticked
+// not accurate time, good for spinning though
+extern uint64_t ticks;
+
+uint16_t pit_read_divider(void);
+void pit_set_divider(uint16_t count);
+
+#endif