summaryrefslogtreecommitdiff
path: root/asm/asm_pit.h
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-09-03 15:18:16 +0200
committerMiguel <m.i@gmx.at>2018-09-03 15:18:16 +0200
commit7eb87bf3f3fa6226657a7106eb255cbfa97758d2 (patch)
tree2d7d2280d32180d18796999bf7687ebe5bf208df /asm/asm_pit.h
parent76b3da6022310dd8edbbbfdf4f73f1696a559853 (diff)
big renaming
Diffstat (limited to 'asm/asm_pit.h')
-rw-r--r--asm/asm_pit.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/asm/asm_pit.h b/asm/asm_pit.h
new file mode 100644
index 0000000..d020de1
--- /dev/null
+++ b/asm/asm_pit.h
@@ -0,0 +1,25 @@
+/**
+ * @file
+ *
+ * PIT - Programmable Interval Timer
+ *
+ * config out timer on channel 0 : mode 2 (sys timer)
+ * * http://en.wikipedia.org/wiki/Intel_8253#Control_Word_Register
+ * * http://www.brokenthorn.com/Resources/OSDevPit.html
+ * int0 will be triggered ~25 times a second.
+ *
+ * The most magic is performed in pit_interrupt_handler which calls
+ * the c function responsible for task switching doing vary bad ass
+ * magic...
+ */
+
+#include <stdint.h>
+
+/** Init PIT - 25 times a second*/
+void asm_pit_init();
+
+/** install this interrupt handler to your Interrupt Vector Table */
+void asm_pit_tick();
+
+/** get number of ticks */
+uint32_t asm_pit_get_ticks();