ExternalIRQ Class Reference

Basic handler for one external IRQ, handles control register. More...

#include <externalirq.h>

Inheritance diagram for ExternalIRQ:
Inheritance graph
[legend]
Collaboration diagram for ExternalIRQ:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ExternalIRQ (IOSpecialReg *ctrl, int ctrlOffset, int ctrlBits)
virtual unsigned char set_from_reg (const IOSpecialReg *reg, unsigned char nv)
virtual unsigned char get_from_client (const IOSpecialReg *reg, unsigned char v)

Protected Member Functions

void setHandlerIndex (ExternalIRQHandler *h, int idx)
 register handler and index for signaling interrupt
void fireInterrupt (void)
 fire a interrupt
virtual void ResetMode (void)
 Reset mode.
virtual void ChangeMode (unsigned char m)
 Handle change of control register.
virtual bool fireAgain (void)
 does the interrupt source fire again? (for interrupt on level)
virtual bool mustSetFlagOnFire (void)
 does fire interrupt set the interrupt flag? (level interrupt does this not!)

Protected Attributes

int handlerIndex
 my own index on handler instance
ExternalIRQHandlerhandler
 reference to IRQ handler
int bitshift
 how many bits to shift to get mode from control register
unsigned char mask
 mask for extract mode from control register
unsigned char mode
 control mode from control register

Friends

class ExternalIRQHandler

Detailed Description

Basic handler for one external IRQ, handles control register.

Definition at line 77 of file externalirq.h.


Constructor & Destructor Documentation

ExternalIRQ::ExternalIRQ ( IOSpecialReg ctrl,
int  ctrlOffset,
int  ctrlBits 
)

Definition at line 141 of file externalirq.cpp.

References bitshift, IOSpecialReg::connectSRegClient(), handler, handlerIndex, and mask.

Here is the call graph for this function:


Member Function Documentation

virtual void ExternalIRQ::ChangeMode ( unsigned char  m  )  [inline, protected, virtual]

Handle change of control register.

Reimplemented in ExternalIRQSingle.

Definition at line 93 of file externalirq.h.

References mode.

Referenced by set_from_reg().

Here is the caller graph for this function:

virtual bool ExternalIRQ::fireAgain ( void   )  [inline, protected, virtual]

does the interrupt source fire again? (for interrupt on level)

Reimplemented in ExternalIRQSingle.

Definition at line 95 of file externalirq.h.

void ExternalIRQ::fireInterrupt ( void   )  [inline, protected]

fire a interrupt

Definition at line 89 of file externalirq.h.

References ExternalIRQHandler::fireInterrupt(), handler, and handlerIndex.

Referenced by ExternalIRQPort::PinStateHasChanged(), and ExternalIRQSingle::PinStateHasChanged().

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned char ExternalIRQ::get_from_client ( const IOSpecialReg reg,
unsigned char  v 
) [virtual]

Informs your class, that a read access from IO register happens

Parameters:
v the internal saved register value (but maybe changed by other clients)
Returns:
v, if nothing is changed or your changed value

Implements IOSpecialRegClient.

Definition at line 155 of file externalirq.cpp.

References bitshift, mask, and mode.

virtual bool ExternalIRQ::mustSetFlagOnFire ( void   )  [inline, protected, virtual]

does fire interrupt set the interrupt flag? (level interrupt does this not!)

Reimplemented in ExternalIRQSingle.

Definition at line 97 of file externalirq.h.

virtual void ExternalIRQ::ResetMode ( void   )  [inline, protected, virtual]

Reset mode.

Definition at line 91 of file externalirq.h.

References mode.

Referenced by ExternalIRQPort::ExternalIRQPort(), and ExternalIRQSingle::ExternalIRQSingle().

Here is the caller graph for this function:

unsigned char ExternalIRQ::set_from_reg ( const IOSpecialReg reg,
unsigned char  nv 
) [virtual]

Informs your class, that a write access to IO register is happen

Parameters:
reg caller register instance
nv the value, which is written to IO register (but maybe changed by other clients)
Returns:
nv, if nothing is changed or your changed value

Implements IOSpecialRegClient.

Definition at line 150 of file externalirq.cpp.

References bitshift, ChangeMode(), and mask.

Here is the call graph for this function:

void ExternalIRQ::setHandlerIndex ( ExternalIRQHandler h,
int  idx 
) [inline, protected]

register handler and index for signaling interrupt

Definition at line 87 of file externalirq.h.

References handler, and handlerIndex.

Referenced by ExternalIRQHandler::registerIrq().

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class ExternalIRQHandler [friend]

Definition at line 99 of file externalirq.h.


Member Data Documentation

int ExternalIRQ::bitshift [protected]

how many bits to shift to get mode from control register

Definition at line 82 of file externalirq.h.

Referenced by ExternalIRQ(), get_from_client(), and set_from_reg().

reference to IRQ handler

Definition at line 81 of file externalirq.h.

Referenced by ExternalIRQ(), fireInterrupt(), and setHandlerIndex().

int ExternalIRQ::handlerIndex [protected]

my own index on handler instance

Definition at line 80 of file externalirq.h.

Referenced by ExternalIRQ(), fireInterrupt(), and setHandlerIndex().

unsigned char ExternalIRQ::mask [protected]

mask for extract mode from control register

Definition at line 83 of file externalirq.h.

Referenced by ExternalIRQ(), get_from_client(), and set_from_reg().

unsigned char ExternalIRQ::mode [protected]

The documentation for this class was generated from the following files:
Generated on Sun Feb 12 16:50:56 2012 for Simulavr by  doxygen 1.6.3