simulavr  1.1.0
GPIORegister Class Reference

A register in IO register space unrelated to any peripheral. "GPIORx" in datasheets. More...

#include <rwmem.h>

Inheritance diagram for GPIORegister:

Public Member Functions

 GPIORegister (AvrDevice *core, TraceValueRegister *registry, const std::string &tracename)
 
void Reset (void)
 
- 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
 
- Public Member Functions inherited from Hardware
 Hardware (AvrDevice *core)
 
virtual ~Hardware ()
 
virtual unsigned int CpuCycle (void)
 
virtual void ClearIrqFlag (unsigned int vector)
 
virtual bool IsLevelInterrupt (unsigned int vector)
 
virtual bool LevelInterruptPending (unsigned int vector)
 

Protected Member Functions

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

Private Attributes

unsigned char value
 

Additional Inherited Members

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

Detailed Description

A register in IO register space unrelated to any peripheral. "GPIORx" in datasheets.

Allows clean read and write accesses and simply has one stored byte.

Definition at line 113 of file rwmem.h.

Constructor & Destructor Documentation

◆ GPIORegister()

GPIORegister::GPIORegister ( AvrDevice core,
TraceValueRegister registry,
const std::string &  tracename 
)
inline

Definition at line 116 of file rwmem.h.

Member Function Documentation

◆ get()

unsigned char GPIORegister::get ( ) const
inlineprotectedvirtual

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

Implements RWMemoryMember.

Definition at line 127 of file rwmem.h.

◆ Reset()

void GPIORegister::Reset ( void  )
inlinevirtual

Implement the hardware's reset functionality here. The default is no action on reset.

Reimplemented from Hardware.

Definition at line 124 of file rwmem.h.

◆ set()

void GPIORegister::set ( unsigned char  nv)
inlineprotectedvirtual

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 128 of file rwmem.h.

Member Data Documentation

◆ value

unsigned char GPIORegister::value
private

Definition at line 131 of file rwmem.h.


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