diff --git a/pit.c b/pit.c index b0ecfbc..35c2d43 100644 --- a/pit.c +++ b/pit.c @@ -1,9 +1,10 @@ #include "pit.h" #include "types.h" #include "interrupts.h" +#include "serial.h" #include "stlio.h" -timer_ticks = 0; +u32 timer_ticks = 0; void inc_ticks(struct cpu_reg_state* cpu) { timer_ticks++; @@ -12,8 +13,6 @@ void inc_ticks(struct cpu_reg_state* cpu) { } } -void tick_width(u32 width) { -} void pit_install_timer(void) { init_irq_handler(0, inc_ticks); // timer interrupt request falls into int 0 } \ No newline at end of file diff --git a/pit.h b/pit.h index 853b716..5aeea57 100644 --- a/pit.h +++ b/pit.h @@ -1,13 +1,12 @@ +#include "interrupts.h" #include "types.h" -u32 timer_ticks; // 60hz timer for now #define PIT_TIMER_INTERVAL 100 #define PIT_TIME_DATA0 0x40 #define PIT_TIME_DATA1 0x41 #define PIT_TIME_DATA2 0x42 -// Sets the tick rate 100hz -void tick_width(u32); +void inc_ticks(struct cpu_reg_state*); -void inc_ticks(struct cpu_reg_state* cpu); \ No newline at end of file +void pit_install_timer(void); \ No newline at end of file