Programmable interval timer (8253/8254) controller. More...
#include <core.h>
Go to the source code of this file.
Functions | |
void | timer_init (uint32_t frequency) |
Initialize the timer controller so that it interrupts the kernel at the requested frequency. More... | |
void | timer_enable () |
Enable timer interrupts. More... | |
void | timer_disable () |
Disable timer interrupts. More... | |
Programmable interval timer (8253/8254) controller.
Definition in file timer.h.
void timer_init | ( | uint32_t | frequency | ) |
Initialize the timer controller so that it interrupts the kernel at the requested frequency.
Interrupts are enabled at the end of the function, so timer_enable does not need to be called after timer_init.
Due to the clock granularity (1193181Hz), the requested frequency may not be perfectly met.
[in] | frequency | The interrupt frequency in Hz. Clamped to the range [19:1193181]. |
Definition at line 37 of file timer.c.
Referenced by kmain().