|
ginnOS
The reference: libc, the libraries and the kernel
|
#include "common/stdint.h"Go to the source code of this file.
Macros | |
| #define | PIT_FREQUENCY_HZ 100u |
Functions | |
| void | pit_initialize (uint32_t frequency) |
| initializes the PIT timer. | |
| uint64_t | pit_get_ticks (void) |
| returns the number of PIT interrupts since initialization. | |
| void | pit_delay_us (uint32_t us) |
| wait for a time with PIT channel 2, without interrupts. | |
| #define PIT_FREQUENCY_HZ 100u |
| void pit_initialize | ( | uint32_t | frequency | ) |
initializes the PIT timer.
| frequency | desired interrupt frequency in Hz. |
| uint64_t pit_get_ticks | ( | void | ) |
returns the number of PIT interrupts since initialization.
| void pit_delay_us | ( | uint32_t | us | ) |
wait for a time with PIT channel 2, without interrupts.
the wait is a busy loop, for short waits in boot code (the start of the other cores). only one core may use channel 2 at a time; the APIC timer calibration at boot also uses it.
| us | the time to wait, in microseconds. |