HWTimer16 Class Reference

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

#include <hwtimer.h>

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

List of all members.

Public Member Functions

 HWTimer16 (AvrDevice *core, PrescalerMultiplexer *p, int unit, IRQLine *tov, IRQLine *tcompA, PinAtPort *outA, IRQLine *tcompB, PinAtPort *outB, IRQLine *tcompC, PinAtPort *outC, IRQLine *ticap, ICaptureSource *icapsrc)
void Reset (void)
 Perform a reset of this unit.

Public Attributes

IOReg< HWTimer16tcnt_h_reg
 counter register, high byte
IOReg< HWTimer16tcnt_l_reg
 counter register, low byte
IOReg< HWTimer16ocra_h_reg
 output compare A register, high byte
IOReg< HWTimer16ocra_l_reg
 output compare A register, low byte
IOReg< HWTimer16ocrb_h_reg
 output compare B register, high byte
IOReg< HWTimer16ocrb_l_reg
 output compare B register, low byte
IOReg< HWTimer16ocrc_h_reg
 output compare C register, high byte
IOReg< HWTimer16ocrc_l_reg
 output compare C register, low byte
IOReg< HWTimer16icr_h_reg
 input capture register, high byte
IOReg< HWTimer16icr_l_reg
 input capture register, low byte

Protected Member Functions

void SetCompareRegister (int idx, bool high, unsigned char val)
 Setter method for compare register.
unsigned char GetCompareRegister (int idx, bool high)
 Getter method for compare register.
void SetComplexRegister (bool is_icr, bool high, unsigned char val)
 Setter method for TCNT and ICR register.
unsigned char GetComplexRegister (bool is_icr, bool high)
 Getter method for TCNT and ICR register.
void ChangeWGM (WGMtype mode)
 Change WGM mode, set counter limits.
void Set_TCNTH (unsigned char val)
 Register access to set counter register high byte.
unsigned char Get_TCNTH ()
 Register access to read counter register high byte.
void Set_TCNTL (unsigned char val)
 Register access to set counter register low byte.
unsigned char Get_TCNTL ()
 Register access to read counter register low byte.
void Set_OCRAH (unsigned char val)
 Register access to set output compare register A high byte.
unsigned char Get_OCRAH ()
 Register access to read output compare register A high byte.
void Set_OCRAL (unsigned char val)
 Register access to set output compare register A low byte.
unsigned char Get_OCRAL ()
 Register access to read output compare register A low byte.
void Set_OCRBH (unsigned char val)
 Register access to set output compare register B high byte.
unsigned char Get_OCRBH ()
 Register access to read output compare register B high byte.
void Set_OCRBL (unsigned char val)
 Register access to set output compare register B low byte.
unsigned char Get_OCRBL ()
 Register access to read output compare register B low byte.
void Set_OCRCH (unsigned char val)
 Register access to set output compare register C high byte.
unsigned char Get_OCRCH ()
 Register access to read output compare register C high byte.
void Set_OCRCL (unsigned char val)
 Register access to set output compare register C low byte.
unsigned char Get_OCRCL ()
 Register access to read output compare register C low byte.
void Set_ICRH (unsigned char val)
 Register access to set input capture register high byte.
unsigned char Get_ICRH ()
 Register access to read input capture register high byte.
void Set_ICRL (unsigned char val)
 Register access to set input capture register low byte.
unsigned char Get_ICRL ()
 Register access to read input capture register low byte.

Protected Attributes

unsigned char accessTempRegister
 the high byte temporary register for read/write access to TCNT and ICR

Detailed Description

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

Definition at line 227 of file hwtimer.h.


Constructor & Destructor Documentation

HWTimer16::HWTimer16 ( AvrDevice core,
PrescalerMultiplexer p,
int  unit,
IRQLine tov,
IRQLine tcompA,
PinAtPort outA,
IRQLine tcompB,
PinAtPort outB,
IRQLine tcompC,
PinAtPort outC,
IRQLine ticap,
ICaptureSource icapsrc 
)

Member Function Documentation

void HWTimer16::ChangeWGM ( WGMtype  mode  )  [protected]
unsigned char HWTimer16::Get_ICRH (  )  [inline, protected]

Register access to read input capture register high byte.

Definition at line 284 of file hwtimer.h.

References GetComplexRegister().

Here is the call graph for this function:

unsigned char HWTimer16::Get_ICRL (  )  [inline, protected]

Register access to read input capture register low byte.

Definition at line 288 of file hwtimer.h.

References GetComplexRegister().

Here is the call graph for this function:

unsigned char HWTimer16::Get_OCRAH (  )  [inline, protected]

Register access to read output compare register A high byte.

Definition at line 257 of file hwtimer.h.

References GetCompareRegister().

Here is the call graph for this function:

unsigned char HWTimer16::Get_OCRAL (  )  [inline, protected]

Register access to read output compare register A low byte.

Definition at line 261 of file hwtimer.h.

References GetCompareRegister().

Here is the call graph for this function:

unsigned char HWTimer16::Get_OCRBH (  )  [inline, protected]

Register access to read output compare register B high byte.

Definition at line 266 of file hwtimer.h.

References GetCompareRegister().

Here is the call graph for this function:

unsigned char HWTimer16::Get_OCRBL (  )  [inline, protected]

Register access to read output compare register B low byte.

Definition at line 270 of file hwtimer.h.

References GetCompareRegister().

Here is the call graph for this function:

unsigned char HWTimer16::Get_OCRCH (  )  [inline, protected]

Register access to read output compare register C high byte.

Definition at line 275 of file hwtimer.h.

References GetCompareRegister().

Here is the call graph for this function:

unsigned char HWTimer16::Get_OCRCL (  )  [inline, protected]

Register access to read output compare register C low byte.

Definition at line 279 of file hwtimer.h.

References GetCompareRegister().

Here is the call graph for this function:

unsigned char HWTimer16::Get_TCNTH (  )  [inline, protected]

Register access to read counter register high byte.

Definition at line 248 of file hwtimer.h.

References GetComplexRegister().

Here is the call graph for this function:

unsigned char HWTimer16::Get_TCNTL (  )  [inline, protected]

Register access to read counter register low byte.

Definition at line 252 of file hwtimer.h.

References GetComplexRegister().

Here is the call graph for this function:

unsigned char HWTimer16::GetCompareRegister ( int  idx,
bool  high 
) [protected]

Getter method for compare register.

Definition at line 764 of file hwtimer.cpp.

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

Referenced by Get_OCRAH(), Get_OCRAL(), Get_OCRBH(), Get_OCRBL(), Get_OCRCH(), and Get_OCRCL().

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned char HWTimer16::GetComplexRegister ( bool  is_icr,
bool  high 
) [protected]

Getter method for TCNT and ICR register.

Definition at line 795 of file hwtimer.cpp.

References accessTempRegister, BasicTimerUnit::icapRegister, and BasicTimerUnit::vtcnt.

Referenced by Get_ICRH(), Get_ICRL(), Get_TCNTH(), and Get_TCNTL().

Here is the caller graph for this function:

void HWTimer16::Reset ( void   )  [virtual]

Perform a reset of this unit.

Reimplemented from BasicTimerUnit.

Reimplemented in HWTimer16_1C, HWTimer16_2C2, HWTimer16_2C3, and HWTimer16_3C.

Definition at line 739 of file hwtimer.cpp.

References accessTempRegister.

Referenced by HWTimer16().

Here is the caller graph for this function:

void HWTimer16::Set_ICRH ( unsigned char  val  )  [inline, protected]

Register access to set input capture register high byte.

Definition at line 282 of file hwtimer.h.

References SetComplexRegister().

Here is the call graph for this function:

void HWTimer16::Set_ICRL ( unsigned char  val  )  [inline, protected]

Register access to set input capture register low byte.

Definition at line 286 of file hwtimer.h.

References SetComplexRegister().

Here is the call graph for this function:

void HWTimer16::Set_OCRAH ( unsigned char  val  )  [inline, protected]

Register access to set output compare register A high byte.

Definition at line 255 of file hwtimer.h.

References SetCompareRegister().

Here is the call graph for this function:

void HWTimer16::Set_OCRAL ( unsigned char  val  )  [inline, protected]

Register access to set output compare register A low byte.

Definition at line 259 of file hwtimer.h.

References SetCompareRegister().

Here is the call graph for this function:

void HWTimer16::Set_OCRBH ( unsigned char  val  )  [inline, protected]

Register access to set output compare register B high byte.

Definition at line 264 of file hwtimer.h.

References SetCompareRegister().

Here is the call graph for this function:

void HWTimer16::Set_OCRBL ( unsigned char  val  )  [inline, protected]

Register access to set output compare register B low byte.

Definition at line 268 of file hwtimer.h.

References SetCompareRegister().

Here is the call graph for this function:

void HWTimer16::Set_OCRCH ( unsigned char  val  )  [inline, protected]

Register access to set output compare register C high byte.

Definition at line 273 of file hwtimer.h.

References SetCompareRegister().

Here is the call graph for this function:

void HWTimer16::Set_OCRCL ( unsigned char  val  )  [inline, protected]

Register access to set output compare register C low byte.

Definition at line 277 of file hwtimer.h.

References SetCompareRegister().

Here is the call graph for this function:

void HWTimer16::Set_TCNTH ( unsigned char  val  )  [inline, protected]

Register access to set counter register high byte.

Definition at line 246 of file hwtimer.h.

References SetComplexRegister().

Here is the call graph for this function:

void HWTimer16::Set_TCNTL ( unsigned char  val  )  [inline, protected]

Register access to set counter register low byte.

Definition at line 250 of file hwtimer.h.

References SetComplexRegister().

Here is the call graph for this function:

void HWTimer16::SetCompareRegister ( int  idx,
bool  high,
unsigned char  val 
) [protected]

Setter method for compare register.

Definition at line 745 of file hwtimer.cpp.

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

Referenced by Set_OCRAH(), Set_OCRAL(), Set_OCRBH(), Set_OCRBL(), Set_OCRCH(), and Set_OCRCL().

Here is the call graph for this function:

Here is the caller graph for this function:

void HWTimer16::SetComplexRegister ( bool  is_icr,
bool  high,
unsigned char  val 
) [protected]

Setter method for TCNT and ICR register.

Definition at line 776 of file hwtimer.cpp.

References accessTempRegister, avr_warning, BasicTimerUnit::icapRegister, BasicTimerUnit::limit_top, BasicTimerUnit::SetCounter(), BasicTimerUnit::wgm, BasicTimerUnit::WGM_FASTPWM_ICR, and BasicTimerUnit::WGMuseICR().

Referenced by Set_ICRH(), Set_ICRL(), Set_TCNTH(), and Set_TCNTL().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

unsigned char HWTimer16::accessTempRegister [protected]

the high byte temporary register for read/write access to TCNT and ICR

Definition at line 231 of file hwtimer.h.

Referenced by GetComplexRegister(), Reset(), SetCompareRegister(), and SetComplexRegister().

output compare C register, high byte

Definition at line 297 of file hwtimer.h.

Referenced by AvrDevice_at90canbase::AvrDevice_at90canbase(), AvrDevice_atmega128::AvrDevice_atmega128(), and HWTimer16().

output compare C register, low byte

Definition at line 298 of file hwtimer.h.

Referenced by AvrDevice_at90canbase::AvrDevice_at90canbase(), AvrDevice_atmega128::AvrDevice_atmega128(), and HWTimer16().


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