This repository has been archived on 2023-09-28. You can view files and clone it, but cannot push or open issues or pull requests.
homepage/content/projects/noxos/docs/codebase/drivers/time/pit.h.md

555 B

title summary
pit.h communicates with the _Programmable Interval Timer_

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, that noxos 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.