simulavr
1.1.0
|
Basic handler for one external IRQ, handles control register. More...
#include <externalirq.h>
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) |
![]() | |
virtual | ~IOSpecialRegClient () |
Protected Member Functions | |
void | setHandlerIndex (ExternalIRQHandler *h, int idx) |
register handler and index for signaling interrupt More... | |
void | fireInterrupt (void) |
fire a interrupt More... | |
virtual void | ResetMode (void) |
Reset mode. More... | |
virtual void | ChangeMode (unsigned char m) |
Handle change of control register. More... | |
virtual bool | fireAgain (void) |
does the interrupt source fire again? (for interrupt on level) More... | |
virtual bool | mustSetFlagOnFire (void) |
does fire interrupt set the interrupt flag? (level interrupt does this not!) More... | |
Protected Attributes | |
int | handlerIndex |
my own index on handler instance More... | |
ExternalIRQHandler * | handler |
reference to IRQ handler More... | |
int | bitshift |
how many bits to shift to get mode from control register More... | |
unsigned char | mask |
mask for extract mode from control register More... | |
unsigned char | mode |
control mode from control register More... | |
Friends | |
class | ExternalIRQHandler |
Basic handler for one external IRQ, handles control register.
Definition at line 77 of file externalirq.h.
ExternalIRQ::ExternalIRQ | ( | IOSpecialReg * | ctrl, |
int | ctrlOffset, | ||
int | ctrlBits | ||
) |
Definition at line 141 of file externalirq.cpp.
References IOSpecialReg::connectSRegClient().
|
inlineprotectedvirtual |
Handle change of control register.
Reimplemented in ExternalIRQSingle.
Definition at line 93 of file externalirq.h.
|
inlineprotectedvirtual |
does the interrupt source fire again? (for interrupt on level)
Reimplemented in ExternalIRQSingle.
Definition at line 95 of file externalirq.h.
|
inlineprotected |
fire a interrupt
Definition at line 89 of file externalirq.h.
References ExternalIRQHandler::fireInterrupt().
Referenced by ExternalIRQSingle::PinStateHasChanged(), and ExternalIRQPort::PinStateHasChanged().
|
virtual |
Informs your class, that a read access from IO register happens
v | the internal saved register value (but maybe changed by other clients) |
Implements IOSpecialRegClient.
Definition at line 155 of file externalirq.cpp.
|
inlineprotectedvirtual |
does fire interrupt set the interrupt flag? (level interrupt does this not!)
Reimplemented in ExternalIRQSingle.
Definition at line 97 of file externalirq.h.
|
inlineprotectedvirtual |
Reset mode.
Definition at line 91 of file externalirq.h.
Referenced by ExternalIRQPort::ExternalIRQPort(), and ExternalIRQSingle::ExternalIRQSingle().
|
virtual |
Informs your class, that a write access to IO register is happen
reg | caller register instance |
nv | the value, which is written to IO register (but maybe changed by other clients) |
Implements IOSpecialRegClient.
Definition at line 150 of file externalirq.cpp.
|
inlineprotected |
register handler and index for signaling interrupt
Definition at line 87 of file externalirq.h.
Referenced by ExternalIRQHandler::registerIrq().
|
friend |
Definition at line 99 of file externalirq.h.
|
protected |
how many bits to shift to get mode from control register
Definition at line 82 of file externalirq.h.
|
protected |
reference to IRQ handler
Definition at line 81 of file externalirq.h.
|
protected |
my own index on handler instance
Definition at line 80 of file externalirq.h.
|
protected |
mask for extract mode from control register
Definition at line 83 of file externalirq.h.
|
protected |
control mode from control register
Definition at line 84 of file externalirq.h.
Referenced by ExternalIRQSingle::ChangeMode(), ExternalIRQSingle::fireAgain(), ExternalIRQSingle::mustSetFlagOnFire(), ExternalIRQSingle::PinStateHasChanged(), and ExternalIRQPort::PinStateHasChanged().