HWTimer16_1C Class Reference

Timer unit with 16Bit counter and one output compare unit. More...

#include <hwtimer.h>

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

List of all members.

Public Member Functions

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

Public Attributes

IOReg< HWTimer16_1Ctccra_reg
 control register A
IOReg< HWTimer16_1Ctccrb_reg
 control register B

Protected Member Functions

void Set_TCCRA (unsigned char val)
 Register access to set control register A.
unsigned char Get_TCCRA ()
 Register access to read control register A.
void Set_TCCRB (unsigned char val)
 Register access to set control register B.
unsigned char Get_TCCRB ()
 Register access to read control register B.

Protected Attributes

unsigned char tccra_val
 register value TCCRA
unsigned char tccrb_val
 register value TCCRB

Private Member Functions

void Set_WGM (int val)
 Handle special WGM setting, translate wgm raw value to wgm value.

Private Attributes

int wgm_raw
 this is the wgm raw value from register

Detailed Description

Timer unit with 16Bit counter and one output compare unit.

This timer unit is used by following devices: AT90[L]S4433.

TCCRxA register contains the following configuration bits (x=timer):

  +-----+-----+---+---+---+---+-----+-----+
  |COMx1|COMx0| - | - | - | - |PWMx1|PWMx0|
  +-----+-----+---+---+---+---+-----+-----+ 

TCCRxB register contains the following configuration bits (x=timer):

  +-----+-----+---+---+----+----+----+----+
  |ICNCx|ICESx| - | - |CTCx|CSx2|CSx1|CSx0|
  +-----+-----+---+---+----+----+----+----+ 

Definition at line 451 of file hwtimer.h.


Constructor & Destructor Documentation

HWTimer16_1C::HWTimer16_1C ( AvrDevice core,
PrescalerMultiplexer p,
int  unit,
IRQLine tov,
IRQLine tcompA,
PinAtPort outA,
IRQLine ticap,
ICaptureSource icapsrc 
)

Definition at line 1012 of file hwtimer.cpp.


Member Function Documentation

unsigned char HWTimer16_1C::Get_TCCRA (  )  [inline, protected]

Register access to read control register A.

Definition at line 466 of file hwtimer.h.

References tccra_val.

unsigned char HWTimer16_1C::Get_TCCRB (  )  [inline, protected]

Register access to read control register B.

Definition at line 471 of file hwtimer.h.

References tccrb_val.

void HWTimer16_1C::Reset ( void   )  [virtual]

Perform a reset of this unit.

Reimplemented from HWTimer16.

Definition at line 1068 of file hwtimer.cpp.

References tccra_val, tccrb_val, and wgm_raw.

void HWTimer16_1C::Set_TCCRA ( unsigned char  val  )  [protected]

Register access to set control register A.

Definition at line 1046 of file hwtimer.cpp.

References Set_WGM(), BasicTimerUnit::SetCompareOutputMode(), tccra_val, and wgm_raw.

Here is the call graph for this function:

void HWTimer16_1C::Set_TCCRB ( unsigned char  val  )  [protected]

Register access to set control register B.

Definition at line 1056 of file hwtimer.cpp.

References BasicTimerUnit::icapNoiseCanceler, BasicTimerUnit::icapRisingEdge, Set_WGM(), BasicTimerUnit::SetClockMode(), tccrb_val, and wgm_raw.

Here is the call graph for this function:

void HWTimer16_1C::Set_WGM ( int  val  )  [private]

Handle special WGM setting, translate wgm raw value to wgm value.

Definition at line 1026 of file hwtimer.cpp.

References HWTimer16::ChangeWGM(), BasicTimerUnit::WGM_CTC_OCRA, BasicTimerUnit::WGM_NORMAL, BasicTimerUnit::WGM_PCPWM_10BIT, BasicTimerUnit::WGM_PCPWM_8BIT, BasicTimerUnit::WGM_PCPWM_9BIT, and wgm_raw.

Referenced by Set_TCCRA(), and Set_TCCRB().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

control register A

Definition at line 474 of file hwtimer.h.

Referenced by AvrDevice_at90s4433::AvrDevice_at90s4433().

unsigned char HWTimer16_1C::tccra_val [protected]

register value TCCRA

Definition at line 460 of file hwtimer.h.

Referenced by Get_TCCRA(), Reset(), and Set_TCCRA().

control register B

Definition at line 475 of file hwtimer.h.

Referenced by AvrDevice_at90s4433::AvrDevice_at90s4433().

unsigned char HWTimer16_1C::tccrb_val [protected]

register value TCCRB

Definition at line 461 of file hwtimer.h.

Referenced by Get_TCCRB(), Reset(), and Set_TCCRB().

int HWTimer16_1C::wgm_raw [private]

this is the wgm raw value from register

Definition at line 454 of file hwtimer.h.

Referenced by Reset(), Set_TCCRA(), Set_TCCRB(), and Set_WGM().


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