simulavr  1.1.0
HWTimerTinyX5_SyncReg Class Reference

Helper class to simulate transfer of register values from bus area to timer async area. More...

#include <hwtimer.h>

Public Member Functions

 HWTimerTinyX5_SyncReg ()
 
void Reset (unsigned char v)
 perform a reset to set valid reset values without clock More...
 
unsigned char operator= (unsigned char v)
 assign new register value More...
 
 operator unsigned char ()
 read register value inside sync area More...
 
unsigned char GetBusValue (void)
 read register value on input area More...
 
bool ClockAndChanged (void)
 check after one clock, if register value has changed More...
 
void MaskOutSync (unsigned char mask)
 Mask out a value inside sync area and do not force a change event. More...
 

Private Attributes

unsigned char inValue
 input register value More...
 
unsigned char regValue
 valid register value inside sync area More...
 

Detailed Description

Helper class to simulate transfer of register values from bus area to timer async area.

This isn't a exact simulation, because it delays the register settings only for one clock cycle. As shown on datasheet it's 1 1/2 clock in sync mode and 1 to 2 clocks in async mode!

Definition at line 746 of file hwtimer.h.

Constructor & Destructor Documentation

◆ HWTimerTinyX5_SyncReg()

HWTimerTinyX5_SyncReg::HWTimerTinyX5_SyncReg ( )
inline

Definition at line 752 of file hwtimer.h.

Member Function Documentation

◆ ClockAndChanged()

bool HWTimerTinyX5_SyncReg::ClockAndChanged ( void  )
inline

check after one clock, if register value has changed

Definition at line 769 of file hwtimer.h.

Referenced by HWTimerTinyX5::TransferInputValues().

◆ GetBusValue()

unsigned char HWTimerTinyX5_SyncReg::GetBusValue ( void  )
inline

◆ MaskOutSync()

void HWTimerTinyX5_SyncReg::MaskOutSync ( unsigned char  mask)
inline

Mask out a value inside sync area and do not force a change event.

Definition at line 772 of file hwtimer.h.

Referenced by HWTimerTinyX5::TransferInputValues().

◆ operator unsigned char()

HWTimerTinyX5_SyncReg::operator unsigned char ( )
inline

read register value inside sync area

Definition at line 762 of file hwtimer.h.

◆ operator=()

unsigned char HWTimerTinyX5_SyncReg::operator= ( unsigned char  v)
inline

assign new register value

Definition at line 758 of file hwtimer.h.

◆ Reset()

void HWTimerTinyX5_SyncReg::Reset ( unsigned char  v)
inline

perform a reset to set valid reset values without clock

Definition at line 755 of file hwtimer.h.

Referenced by HWTimerTinyX5::Reset().

Member Data Documentation

◆ inValue

unsigned char HWTimerTinyX5_SyncReg::inValue
private

input register value

Definition at line 748 of file hwtimer.h.

◆ regValue

unsigned char HWTimerTinyX5_SyncReg::regValue
private

valid register value inside sync area

Definition at line 749 of file hwtimer.h.


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