simulavr  1.1.0
NotSimulatedRegister Class Reference

An IO register which is not simulated in the moment. Reads and writes are ignored and produce warning. More...

#include <rwmem.h>

Inheritance diagram for NotSimulatedRegister:

Public Types

enum  {
  TWI_TWAMR = 0, TWI_TWCR, TWI_TWDR, TWI_TWAR,
  TWI_TWSR, TWI_TWBR, ADC_DIDR0, ADC_DIDR1,
  ADC_DIDR2, MCU_PRR, MCU_PRR0, MCU_PRR1,
  MCU_WDTCSR, MCU_MCUCR, MCU_MCUSR, MCU_SMCR,
  OCD_OCDR, XMC_XMCRA, XMC_XMCRB, NSR_size
}
 

Public Member Functions

 NotSimulatedRegister (const char *oname, const char *rname)
 
- Public Member Functions inherited from RWMemoryMember
 RWMemoryMember (TraceValueRegister *registry, const std::string &tracename="", const int index=-1)
 
 RWMemoryMember (void)
 
 operator unsigned char () const
 Read access on memory. More...
 
unsigned char operator= (unsigned char val)
 Write access on memory. More...
 
unsigned char operator= (const RWMemoryMember &mm)
 Write access on memory. More...
 
virtual ~RWMemoryMember ()
 
virtual void set_bit (unsigned int bitaddr)
 
virtual void clear_bit (unsigned int bitaddr)
 
const std::string & GetTraceName (void)
 
bool IsInvalid (void) const
 

Static Public Member Functions

static NotSimulatedRegistergetRegister (int reg)
 

Protected Member Functions

unsigned char get () const
 
void set (unsigned char)
 

Private Attributes

const char * obj_name
 
const char * reg_name
 

Additional Inherited Members

- Protected Attributes inherited from RWMemoryMember
TraceValuetv
 
TraceValueRegisterregistry
 
const std::string tracename
 
const bool isInvalid
 

Detailed Description

An IO register which is not simulated in the moment. Reads and writes are ignored and produce warning.

Definition at line 238 of file rwmem.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
TWI_TWAMR 
TWI_TWCR 
TWI_TWDR 
TWI_TWAR 
TWI_TWSR 
TWI_TWBR 
ADC_DIDR0 
ADC_DIDR1 
ADC_DIDR2 
MCU_PRR 
MCU_PRR0 
MCU_PRR1 
MCU_WDTCSR 
MCU_MCUCR 
MCU_MCUSR 
MCU_SMCR 
OCD_OCDR 
XMC_XMCRA 
XMC_XMCRB 
NSR_size 

Definition at line 246 of file rwmem.h.

Constructor & Destructor Documentation

◆ NotSimulatedRegister()

NotSimulatedRegister::NotSimulatedRegister ( const char *  oname,
const char *  rname 
)

Definition at line 240 of file rwmem.cpp.

Member Function Documentation

◆ get()

unsigned char NotSimulatedRegister::get ( ) const
protectedvirtual

This function as the oppposite to get() is expected to read the real byte.

Implements RWMemoryMember.

Definition at line 244 of file rwmem.cpp.

References avr_warning, global_suppress_memory_warnings, obj_name, and reg_name.

◆ getRegister()

◆ set()

void NotSimulatedRegister::set ( unsigned  nv)
protectedvirtual

This function is the function which will be called by the above access operators and is expected to do the real work when writing a byte.

Implements RWMemoryMember.

Definition at line 250 of file rwmem.cpp.

References avr_warning, global_suppress_memory_warnings, obj_name, and reg_name.

Member Data Documentation

◆ obj_name

const char* NotSimulatedRegister::obj_name
private

Definition at line 240 of file rwmem.h.

Referenced by get(), and set().

◆ reg_name

const char* NotSimulatedRegister::reg_name
private

Definition at line 241 of file rwmem.h.

Referenced by get(), and set().


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