1
0
Fork 0
mirror of https://github.com/tailix/kernel.git synced 2024-10-30 12:03:52 -04:00
kernel/arch/timer.c
2017-11-03 04:25:53 +00:00

13 lines
271 B
C

#include "timer.h"
#include "logger.h"
#include "asm.h"
void timer_initialize(unsigned int frequency)
{
logger_info("Initialize timer.");
outportb(0x43, 0x36);
outportb(0x40, (1193180 / frequency) & 0xFF);
outportb(0x40, (1193180 / frequency) >> 8);
}