From d66ba8aebfa8c225a2bfcecb076a9823dc6d4fdc Mon Sep 17 00:00:00 2001 From: antifallobst Date: Tue, 21 Feb 2023 12:06:24 +0100 Subject: [PATCH] docs: documented the Programmable Interval Timer (PIT) --- .wiki/Kernel-documentation.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.wiki/Kernel-documentation.md b/.wiki/Kernel-documentation.md index 7de704d..8d5938b 100644 --- a/.wiki/Kernel-documentation.md +++ b/.wiki/Kernel-documentation.md @@ -20,6 +20,7 @@ The single parts of the kernel are initialized in the following order: - **[PIC] Programmable Interrupt Controller** - **Paging** - **Kernel Heap** + - **Graphics Renderer** - **Scheduler** ## Interrupt handling @@ -382,6 +383,18 @@ Returns the width of the framebuffer. #### `graphics_renderer_get_height()` - function (uint32_t) Returns the height of the framebuffer. +### time/pit.h +#### `PIT_CHANNEL_0_PORT` - macro +The IO port, where channel 0 of the PIT (which is capable of firing IRQs) can be configured. + +#### `PIT_DIVISOR` - macro +The standard divisor nox_os loads into channel 0 of the PIT. +`32768` fires an interrupt every `~27ms`, what is perfect for preemptive multithreading. + +#### `pit_set_divisor(divisor)` - function (void) +Loads **_divisor_** into channel 0 of the PIT. +If **_divisor_** is smaller than 100, it will be set to 100. + ## mm ### heap.h