HWTimer8 Class Reference

Extends BasicTimerUnit to provide common support to all types of 8Bit timer units. More...

#include <hwtimer.h>

Inheritance diagram for HWTimer8:
Inheritance graph
[legend]
Collaboration diagram for HWTimer8:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 HWTimer8 (AvrDevice *core, PrescalerMultiplexer *p, int unit, IRQLine *tov, IRQLine *tcompA, PinAtPort *outA, IRQLine *tcompB, PinAtPort *outB)
void Reset ()
 Perform a reset of this unit.

Public Attributes

IOReg< HWTimer8tcnt_reg
 counter register
IOReg< HWTimer8ocra_reg
 output compare A register
IOReg< HWTimer8ocrb_reg
 output compare B register

Protected Member Functions

void ChangeWGM (WGMtype mode)
 Change WGM mode, set counter limits.
void SetCompareRegister (int idx, unsigned char val)
 Setter method for compare register.
unsigned char GetCompareRegister (int idx)
 Getter method for compare register.
void Set_TCNT (unsigned char val)
 Register access to set counter register high byte.
unsigned char Get_TCNT ()
 Register access to read counter register high byte.
void Set_OCRA (unsigned char val)
 Register access to set output compare register A.
unsigned char Get_OCRA ()
 Register access to read output compare register A.
void Set_OCRB (unsigned char val)
 Register access to set output compare register B.
unsigned char Get_OCRB ()
 Register access to read output compare register B.

Detailed Description

Extends BasicTimerUnit to provide common support to all types of 8Bit timer units.

Definition at line 183 of file hwtimer.h.


Constructor & Destructor Documentation

HWTimer8::HWTimer8 ( AvrDevice core,
PrescalerMultiplexer p,
int  unit,
IRQLine tov,
IRQLine tcompA,
PinAtPort outA,
IRQLine tcompB,
PinAtPort outB 
)

Member Function Documentation

void HWTimer8::ChangeWGM ( WGMtype  mode  )  [protected]
unsigned char HWTimer8::Get_OCRA (  )  [inline, protected]

Register access to read output compare register A.

Definition at line 202 of file hwtimer.h.

References GetCompareRegister().

Here is the call graph for this function:

unsigned char HWTimer8::Get_OCRB (  )  [inline, protected]

Register access to read output compare register B.

Definition at line 207 of file hwtimer.h.

References GetCompareRegister().

Here is the call graph for this function:

unsigned char HWTimer8::Get_TCNT (  )  [inline, protected]

Register access to read counter register high byte.

Definition at line 197 of file hwtimer.h.

References BasicTimerUnit::vtcnt.

unsigned char HWTimer8::GetCompareRegister ( int  idx  )  [protected]

Getter method for compare register.

Definition at line 651 of file hwtimer.cpp.

References BasicTimerUnit::compare, BasicTimerUnit::compare_dbl, and BasicTimerUnit::WGMisPWM().

Referenced by Get_OCRA(), and Get_OCRB().

Here is the call graph for this function:

Here is the caller graph for this function:

void HWTimer8::Reset ( void   )  [virtual]

Perform a reset of this unit.

Reimplemented from BasicTimerUnit.

Reimplemented in HWTimer8_0C, HWTimer8_1C, and HWTimer8_2C.

Definition at line 608 of file hwtimer.cpp.

Referenced by HWTimer8().

Here is the caller graph for this function:

void HWTimer8::Set_OCRA ( unsigned char  val  )  [inline, protected]

Register access to set output compare register A.

Definition at line 200 of file hwtimer.h.

References SetCompareRegister().

Here is the call graph for this function:

void HWTimer8::Set_OCRB ( unsigned char  val  )  [inline, protected]

Register access to set output compare register B.

Definition at line 205 of file hwtimer.h.

References SetCompareRegister().

Here is the call graph for this function:

void HWTimer8::Set_TCNT ( unsigned char  val  )  [inline, protected]

Register access to set counter register high byte.

Definition at line 195 of file hwtimer.h.

References BasicTimerUnit::SetCounter().

Here is the call graph for this function:

void HWTimer8::SetCompareRegister ( int  idx,
unsigned char  val 
) [protected]

Setter method for compare register.

Definition at line 638 of file hwtimer.cpp.

References BasicTimerUnit::compare, BasicTimerUnit::compare_dbl, BasicTimerUnit::limit_top, BasicTimerUnit::wgm, BasicTimerUnit::WGM_CTC_OCRA, and BasicTimerUnit::WGMisPWM().

Referenced by Set_OCRA(), and Set_OCRB().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation


The documentation for this class was generated from the following files:
Generated on Sun Feb 12 16:52:18 2012 for Simulavr by  doxygen 1.6.3