IO register to be specialized for a certain class/hardware. More...
#include <rwmem.h>
Public Types | |
typedef unsigned char(P::* | getter_t )() |
typedef void(P::* | setter_t )(unsigned char) |
Public Member Functions | |
IOReg (TraceValueRegister *registry, const std::string &tracename, P *_p, getter_t _g=0, setter_t _s=0) | |
void | hardwareChange (unsigned char val) |
void | releaseTraceValue (void) |
Protected Member Functions | |
unsigned char | get () const |
void | set (unsigned char val) |
Private Attributes | |
P * | p |
getter_t | g |
setter_t | s |
IO register to be specialized for a certain class/hardware.
The template parameter class P specifies the class type in which the io register resides.
Definition at line 160 of file rwmem.h.
IOReg< P >::IOReg | ( | TraceValueRegister * | registry, | |
const std::string & | tracename, | |||
P * | _p, | |||
getter_t | _g = 0 , |
|||
setter_t | _s = 0 | |||
) | [inline] |
unsigned char IOReg< P >::get | ( | ) | const [inline, protected, virtual] |
This function as the oppposite to get() is expected to read the real byte.
Implements RWMemoryMember.
void IOReg< P >::hardwareChange | ( | unsigned char | val | ) | [inline] |
Reflects a value change from hardware (for example timer count occured)
val | the new register value |
Definition at line 186 of file rwmem.h.
Referenced by HWStackSram::Pop(), HWStackSram::Push(), PinAtPort::SetAlternatePort(), HWStackSram::SetSph(), and HWStackSram::SetSpl().
void IOReg< P >::releaseTraceValue | ( | void | ) | [inline] |
Releases the TraceValue to hide this IOReg from registry
Definition at line 188 of file rwmem.h.
Referenced by HWTimer16::HWTimer16(), HWTimer8::HWTimer8(), and HWUsart::HWUsart().
void IOReg< P >::set | ( | unsigned char | nv | ) | [inline, protected, virtual] |
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 215 of file rwmem.h.
Referenced by IOReg< HWTimer8_0C >::get().
Definition at line 214 of file rwmem.h.
Referenced by IOReg< HWTimer8_0C >::get(), and IOReg< HWTimer8_0C >::set().
Definition at line 216 of file rwmem.h.
Referenced by IOReg< HWTimer8_0C >::set().