Max OS 0.3
Loading...
Searching...
No Matches
MaxOS::drivers::clock::PIT Class Reference

Driver for the Programmable Interval Timer. More...

#include <clock.h>

Inheritance diagram for MaxOS::drivers::clock::PIT:
MaxOS::hardwarecommunication::InterruptHandler

Public Member Functions

 PIT (hardwarecommunication::AdvancedProgrammableInterruptController *apic)
 Constructor for the PIT class. Registers a handler for interrupt 0x22 and initialises ports.
 
- Public Member Functions inherited from MaxOS::hardwarecommunication::InterruptHandler
virtual system::cpu_status_thandle_interrupt (system::cpu_status_t *status)
 Handles an interrupt and returns the status.
 

Additional Inherited Members

- Protected Member Functions inherited from MaxOS::hardwarecommunication::InterruptHandler
 InterruptHandler (uint8_t interrupt_number, int64_t redirect=-1, uint64_t redirect_index=0)
 Creates a new interrupt handler and registers it with the interrupt manager.
 
 ~InterruptHandler ()
 Destroys the interrupt handler and unregisters it from the interrupt manager.
 
- Protected Attributes inherited from MaxOS::hardwarecommunication::InterruptHandler
uint8_t m_interrupt_number
 The interrupt number this handler handles.
 

Detailed Description

Driver for the Programmable Interval Timer.

Definition at line 95 of file clock.h.

Constructor & Destructor Documentation

◆ PIT()

Constructor for the PIT class. Registers a handler for interrupt 0x22 and initialises ports.

Parameters
apicThe APIC controller for the BSP core

Definition at line 216 of file clock.cpp.

217: InterruptHandler(0x22),
218 m_data_port(0x40),
219 m_command_port(0x43),
220 m_local_apic(apic->local_apic()),
221 m_io_apic(apic->io_apic())
222{
223
224}
Handles a certain interrupt number.
Definition interrupts.h:30

The documentation for this class was generated from the following files: