44 irqSystem(_irqSystem),
46 eearh_reg(this,
"EEARH",
48 eearl_reg(this,
"EEARL",
50 eedr_reg(this,
"EEDR",
52 eecr_reg(this,
"EECR",
59 for(
unsigned int tt = 0; tt <
size; tt++)
119 if((
GetSize() <= 256) && (val != 0))
120 avr_warning(
"invalid write access: EEARH=0x%02x, EEPROM size <= 256 byte", val);
129 traceOut <<
"EEDR=0x"<< hex << (
unsigned int)
eedr << dec;
134 traceOut <<
"EECR=0x" << hex << (
unsigned int)newval << dec;
156 traceOut <<
" EEPROM: Read = 0x" << hex << (
unsigned int)
eedr << dec;
172 traceOut <<
" EEPROM: Read = 0x" << hex << (
unsigned int)
eedr << dec;
184 eecr &= ~CTRL_ENABLE;
187 switch(
opMode & CTRL_MODES) {
207 if((eecr & CTRL_ENABLE) == CTRL_ENABLE) {
229 traceOut <<
" EEPROM: WriteEnable cleared";
289 for(
unsigned int tt = 0; tt < secSize; tt++) {
290 if(tt + offset <
size) {
291 *(
myMemory + tt + offset) = src[tt];
Basic AVR device, contains the core functionality.
void AddToCycleList(Hardware *hw)
SystemClockOffset GetCurrentTime() const
Returns the current simulation time.
unsigned char ReadFromAddress(unsigned int)
void avr_free(void *ptr)
Free malloc'd memory.
SystemClockOffset writeDoneTime
void ClearIrqFlag(unsigned int vector)
void WriteAtAddress(unsigned int, unsigned char)
void SetEearh(unsigned char)
void SetEedr(unsigned char)
SystemClockOffset writeDelayTime
SystemClockOffset eraseDelayTime
void WriteMem(const unsigned char *, unsigned int offset, unsigned int size)
Build a register for TraceValue's.
static SystemClock & Instance()
Returns the central SystemClock instance for the application.
void SetIrqFlag(Hardware *, unsigned int vector_index)
HWEeprom(AvrDevice *core, HWIrqSystem *irqs, unsigned int size, unsigned int irqVec, int devMode=DEVMODE_NORMAL)
long long SystemClockOffset
void SetEecr(unsigned char)
void SetEearl(unsigned char)
Hold a memory block and symbol informations.
void RemoveFromCycleList(Hardware *hw)
Removes from the cycle list, if possible.
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.
void ClearIrqFlag(unsigned int vector_index)
SystemClockOffset eraseWriteDelayTime
virtual unsigned int CpuCycle()