The Pedigree Project  0.1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
Pit Class Reference

#include <Pit.h>

+ Inheritance diagram for Pit:
+ Collaboration diagram for Pit:

Public Member Functions

virtual bool registerHandler (TimerHandler *handler)
 
bool initialise () INITIALISATION_ONLY
 
void uninitialise ()
 

Static Public Member Functions

static Pitinstance ()
 

Protected Member Functions

 Pit () INITIALISATION_ONLY
 
virtual ~Pit ()
 
- Protected Member Functions inherited from SchedulerTimer
 SchedulerTimer ()
 
virtual ~SchedulerTimer ()
 

Private Member Functions

 Pit (const Pit &)
 
Pitoperator= (const Pit &)
 
virtual bool irq (irq_id_t number, InterruptState &state)
 
virtual ~IrqHandler ()
 

Private Attributes

IoPort m_IoPort
 
irq_id_t m_IrqId
 
TimerHandlerm_Handler
 

Static Private Attributes

static Pit m_Instance
 

Detailed Description

The programmable interval timer implements the SchedulerTimer interface

Definition at line 36 of file Pit.h.

Constructor & Destructor Documentation

Pit::Pit ( )
protected

The default constructor

Definition at line 91 of file Pit.cc.

Referenced by instance(), and ~Pit().

+ Here is the caller graph for this function:

virtual Pit::~Pit ( )
inlineprotectedvirtual

The destructor

Definition at line 60 of file Pit.h.

References irq(), operator=(), and Pit().

Pit::Pit ( const Pit )
private

The copy-constructor

Note
NOT implemented

Member Function Documentation

bool Pit::initialise ( )

Initialises the class

Returns
true, if successful, false otherwise

Definition at line 45 of file Pit.cc.

References IoPort::allocate(), m_IoPort, m_IrqId, IrqManager::registerIsaIrqHandler(), and IoPort::write8().

Referenced by Pc::initialise(), and instance().

+ Here is the caller graph for this function:

static Pit& Pit::instance ( )
inlinestatic

Get the Pit class instance

Definition at line 40 of file Pit.h.

References INITIALISATION_ONLY, initialise(), m_Instance, Pit(), and uninitialise().

Referenced by Pc::getSchedulerTimer(), and Pc::initialise().

+ Here is the caller graph for this function:

bool Pit::irq ( irq_id_t  number,
InterruptState &  state 
)
privatevirtual

Called when the handler is registered with the irq manager and the irq occurred

Note
If this function returns false you have to call IrqManager::acknowledgeIrq() when you removed the interrupt reason.
Parameters
[in]numberthe irq number
Returns
should return true, if the interrupt reason was removed, or false otherwise

Implements IrqHandler.

Definition at line 95 of file Pit.cc.

References LIKELY, m_Handler, and TimerHandler::timer().

Referenced by ~Pit().

+ Here is the caller graph for this function:

Pit& Pit::operator= ( const Pit )
private

The assignment operator

Note
NOT implemented

Referenced by ~Pit().

+ Here is the caller graph for this function:

void Pit::uninitialise ( )

Uninitialises the class

Definition at line 76 of file Pit.cc.

References IoPort::free(), m_IoPort, m_IrqId, and IrqManager::unregisterHandler().

Referenced by instance().

+ Here is the caller graph for this function:

Member Data Documentation

TimerHandler* Pit::m_Handler
private

The scheduler

Definition at line 82 of file Pit.h.

Referenced by irq().

Pit Pit::m_Instance
staticprivate

The Pit class instance

Definition at line 85 of file Pit.h.

Referenced by instance().

IoPort Pit::m_IoPort
private

The PIT I/O port range

Definition at line 78 of file Pit.h.

Referenced by initialise(), and uninitialise().

irq_id_t Pit::m_IrqId
private

The PIT IRQ Id

Definition at line 80 of file Pit.h.

Referenced by initialise(), and uninitialise().


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