quark/src/kernel/arch/i686/pit.c
Arnau Camprubí be55b8121c Floppy disk controller, new keyboard and PIT driver interface, many things
- Implemented basic FDC capable of reading floppy disc sectors
 - Now PIT timer can be used, as it counts the ticks
 - Now the keyboard is buffered, instead of being accessed only during the interrupt itself
 - HAL for sleep()
 - gets()
 - atoi()
 - Now shell is not called by the IRQ, but it's a procedure that reads the key buffer
2022-08-15 01:34:15 +02:00

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;
}