documentation/kernel/drivers/time/pit.h.md

14 lines
531 B
Markdown
Raw Normal View History

2023-05-28 17:16:43 +00:00
# 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.