HWPrescalerAsync Class Reference

Extends HWPrescaler with a external clock oszillator pin. More...

#include <timerprescaler.h>

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

List of all members.

Public Member Functions

 HWPrescalerAsync (AvrDevice *core, const std::string &tracename, PinAtPort tosc_pin, IOSpecialReg *asyreg, int clockSelBit, IOSpecialReg *resreg, int resetBit)
 Creates HWPrescalerAsync instance with reset but without sync reset feature.
 HWPrescalerAsync (AvrDevice *core, const std::string &tracename, PinAtPort tosc_pin, IOSpecialReg *asyreg, int clockSelBit, IOSpecialReg *resreg, int resetBit, int resetSyncBit)
 Creates HWPrescalerAsync instance with reset and sync reset feature.
virtual unsigned int CpuCycle ()
 Count functionality for prescaler.

Protected Member Functions

unsigned char set_from_reg (const IOSpecialReg *reg, unsigned char nv)
 IO register interface set method, see IOSpecialRegClient.

Private Attributes

IOSpecialRegasyncRegister
 instance of IO register with assr bits
PinAtPort tosc_pin
 input pin for external timer oscillator
bool pinstate
 saved pin status of osc. pin
bool clockselect
 holds the clock select state, true is external clock
int clockSelectBit
 holds bit position of counter clock select

Detailed Description

Extends HWPrescaler with a external clock oszillator pin.

Todo:
check external clock input and that TOSC1 and TOSC2 get back 0 if core read port input

Definition at line 83 of file timerprescaler.h.


Constructor & Destructor Documentation

HWPrescalerAsync::HWPrescalerAsync ( AvrDevice core,
const std::string &  tracename,
PinAtPort  tosc_pin,
IOSpecialReg asyreg,
int  clockSelBit,
IOSpecialReg resreg,
int  resetBit 
)

Creates HWPrescalerAsync instance with reset but without sync reset feature.

Definition at line 93 of file timerprescaler.cpp.

References asyncRegister, clockselect, IOSpecialReg::connectSRegClient(), PinAtPort::GetPin(), pinstate, and tosc_pin.

Here is the call graph for this function:

HWPrescalerAsync::HWPrescalerAsync ( AvrDevice core,
const std::string &  tracename,
PinAtPort  tosc_pin,
IOSpecialReg asyreg,
int  clockSelBit,
IOSpecialReg resreg,
int  resetBit,
int  resetSyncBit 
)

Creates HWPrescalerAsync instance with reset and sync reset feature.

Definition at line 110 of file timerprescaler.cpp.

References asyncRegister, clockselect, IOSpecialReg::connectSRegClient(), PinAtPort::GetPin(), pinstate, and tosc_pin.

Here is the call graph for this function:


Member Function Documentation

unsigned int HWPrescalerAsync::CpuCycle ( void   )  [virtual]

Count functionality for prescaler.

Reimplemented from HWPrescaler.

Definition at line 128 of file timerprescaler.cpp.

References clockselect, HWPrescaler::countEnable, PinAtPort::GetPin(), pinstate, HWPrescaler::preScaleValue, and tosc_pin.

Here is the call graph for this function:

unsigned char HWPrescalerAsync::set_from_reg ( const IOSpecialReg reg,
unsigned char  nv 
) [protected, virtual]

IO register interface set method, see IOSpecialRegClient.

Reimplemented from HWPrescaler.

Definition at line 142 of file timerprescaler.cpp.

References asyncRegister, clockselect, and clockSelectBit.


Member Data Documentation

instance of IO register with assr bits

Definition at line 111 of file timerprescaler.h.

Referenced by HWPrescalerAsync(), and set_from_reg().

holds the clock select state, true is external clock

Definition at line 114 of file timerprescaler.h.

Referenced by CpuCycle(), HWPrescalerAsync(), and set_from_reg().

holds bit position of counter clock select

Definition at line 115 of file timerprescaler.h.

Referenced by set_from_reg().

saved pin status of osc. pin

Definition at line 113 of file timerprescaler.h.

Referenced by CpuCycle(), and HWPrescalerAsync().

input pin for external timer oscillator

Definition at line 112 of file timerprescaler.h.

Referenced by CpuCycle(), and HWPrescalerAsync().


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