21 #include "pedigree/kernel/compiler.h" 22 #include "pedigree/kernel/machine/IrqManager.h" 23 #include "pedigree/kernel/machine/Machine.h" 24 #include "pedigree/kernel/machine/TimerHandler.h" 25 #include "pedigree/kernel/processor/types.h" 29 #define PIT_FREQUENCY 10 31 #define PIT_FREQUENCY 100 52 IrqManager &irqManager = *Machine::instance().getIrqManager();
61 size_t divisor = 1193180 / PIT_FREQUENCY;
67 uint8_t l = divisor & 0xFF;
68 uint8_t h = (divisor >> 8) & 0xFF;
83 IrqManager &irqManager = *Machine::instance().getIrqManager();
95 bool Pit::irq(irq_id_t number, InterruptState &state)
virtual void unregisterHandler(irq_id_t Id, IrqHandler *handler)=0
virtual bool irq(irq_id_t number, InterruptState &state)
bool allocate(io_port_t ioPort, size_t size)
virtual void timer(uint64_t delta, InterruptState &state)=0
virtual irq_id_t registerIsaIrqHandler(uint8_t irq, IrqHandler *handler, bool bEdge=false)=0
bool initialise() INITIALISATION_ONLY
virtual void write8(uint8_t value, size_t offset=0)
Pit() INITIALISATION_ONLY