From e8256360254d3a591693a87cab6aa8d641bb6c2c Mon Sep 17 00:00:00 2001 From: antifallobst Date: Wed, 15 Mar 2023 23:43:05 +0100 Subject: [PATCH] noxos (docs): merged 'drivers/time' docs from .wiki --- .../projects/noxos/docs/codebase/drivers/time.md | 4 ++++ .../noxos/docs/codebase/drivers/time/_index.md | 5 +++++ .../noxos/docs/codebase/drivers/time/pit.h.md | 15 +++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 content/projects/noxos/docs/codebase/drivers/time.md create mode 100644 content/projects/noxos/docs/codebase/drivers/time/_index.md create mode 100644 content/projects/noxos/docs/codebase/drivers/time/pit.h.md diff --git a/content/projects/noxos/docs/codebase/drivers/time.md b/content/projects/noxos/docs/codebase/drivers/time.md new file mode 100644 index 0000000..c45f870 --- /dev/null +++ b/content/projects/noxos/docs/codebase/drivers/time.md @@ -0,0 +1,4 @@ +--- +title: "time" +summary: "drivers for time related hardware" +--- \ No newline at end of file diff --git a/content/projects/noxos/docs/codebase/drivers/time/_index.md b/content/projects/noxos/docs/codebase/drivers/time/_index.md new file mode 100644 index 0000000..7efc7c8 --- /dev/null +++ b/content/projects/noxos/docs/codebase/drivers/time/_index.md @@ -0,0 +1,5 @@ +--- +title: "time" +--- + +Tick. Tack. Tick. Tack. \ No newline at end of file diff --git a/content/projects/noxos/docs/codebase/drivers/time/pit.h.md b/content/projects/noxos/docs/codebase/drivers/time/pit.h.md new file mode 100644 index 0000000..5ea6aee --- /dev/null +++ b/content/projects/noxos/docs/codebase/drivers/time/pit.h.md @@ -0,0 +1,15 @@ +--- +title: "pit.h" +summary: "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. \ No newline at end of file