réplica de
https://github.com/Arnau478/quark.git
synced 2024-06-02 15:16:29 +02:00
20 líneas
400 B
C
20 líneas
400 B
C
|
#include "pit.h"
|
||
|
#include "isr.h"
|
||
|
#include "../../lib/stdio.h"
|
||
|
#include "../../lib/debug.h"
|
||
|
|
||
|
static volatile uint32_t g_tick_count = 0;
|
||
|
|
||
|
static void i686_pit_handler(registers *regs){
|
||
|
g_tick_count++;
|
||
|
}
|
||
|
|
||
|
void i686_pit_initialize(){
|
||
|
debug_printf("[PIT] Initializing\n");
|
||
|
i686_isr_register_handler(IRQ(0), i686_pit_handler);
|
||
|
}
|
||
|
|
||
|
uint32_t i686_pit_get_tick_count(){
|
||
|
return g_tick_count;
|
||
|
}
|