50 static const std::string
__hlp2name(
const std::string s,
int i) {
61 static const std::string
__hlp2scope(
const std::string p,
int i) {
110 std::map<std::string, int>::iterator cur =
name2line.find(n);
112 avr_error(
"IRQ line '%s' not found", n.c_str());
141 unsigned int idx = 0;
144 for(; idx <
lines.size(); idx++, m <<= 1) {
145 if(((nv & m) != 0) &&
148 (
lines[idx].active()))
159 for(
unsigned char idx = 0; idx <
lines.size(); ++idx)
Basic AVR device, contains the core functionality.
static const std::string __hlp2name(const std::string s, int i)
unsigned char bitmask
mask for used bits in registers
void hardwareChange(unsigned char val)
std::vector< IRQLine > lines
list with IRQ lines
virtual void ClearIrqFlag(unsigned int vector)
virtual unsigned char get_from_client(const IOSpecialReg *reg, unsigned char v)
HWIrqSystem * irqsystem
pointer to irq system
std::map< int, int > vector2line
mapping IRQ vector to index
int irqvector
the IRQ vector number in interrupt table, starting with 0
unsigned char irqmask
mask register value;
Represents a timer interrupt line, Frontend for timer interrupts.
void Reset(void)
Register reset functionality, sets internal register value to 0.
std::string name
name of this IRQ line
void connectSRegClient(IOSpecialRegClient *c)
Registers a client to this IO register to inform this client on read or write access.
virtual unsigned char set_from_reg(const IOSpecialReg *reg, unsigned char nv)
IOSpecialReg tifr_reg
the TIFRx register
TimerIRQRegister * irqreg
pointer to irq registers, where this line is hold
void fireInterrupt(int irqvector)
Build a register for TraceValue's.
void SetIrqFlag(Hardware *, unsigned int vector_index)
void fireInterrupt(void)
inform interrupt system, that an interrupt occured
std::string int2str(int i)
Convert an int into a string.
static const std::string __hlp2scope(const std::string p, int i)
void registerLine(int idx, IRQLine *irq)
unsigned char irqflags
flag register value;
void DebugVerifyInterruptVector(unsigned int vector_index, const Hardware *source)
In datasheets RESET vector is index 1 but we use 0! And not a byte address.
IRQLine * getLine(const std::string &name)
void ClearIrqFlag(unsigned int vector_index)
TimerIRQRegister(AvrDevice *core, HWIrqSystem *irqsys, int regidx=-1)
std::map< std::string, int > name2line
mapping IRQ line name to index
IOSpecialReg timsk_reg
the TIMSKx register