simulavr
1.1.0
|
Extends HWPrescaler with a external clock oszillator pin. More...
#include <timerprescaler.h>
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. More... | |
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. More... | |
virtual unsigned int | CpuCycle () |
Count functionality for prescaler. More... | |
![]() | |
HWPrescaler (AvrDevice *core, const std::string &tracename) | |
Creates HWPrescaler instance without reset feature. More... | |
HWPrescaler (AvrDevice *core, const std::string &tracename, IOSpecialReg *ioreg, int resetBit) | |
Creates HWPrescaler instance with reset but without sync reset feature. More... | |
HWPrescaler (AvrDevice *core, const std::string &tracename, IOSpecialReg *ioreg, int resetBit, int resetSyncBit) | |
Creates HWPrescaler instance with reset and sync reset feature. More... | |
unsigned short | GetValue () |
Get method for current prescaler counter value. More... | |
void | Reset () |
Reset method, sets prescaler counter to 0. More... | |
![]() | |
Hardware (AvrDevice *core) | |
virtual | ~Hardware () |
virtual void | ClearIrqFlag (unsigned int vector) |
virtual bool | IsLevelInterrupt (unsigned int vector) |
virtual bool | LevelInterruptPending (unsigned int vector) |
![]() | |
virtual | ~IOSpecialRegClient () |
Protected Member Functions | |
unsigned char | set_from_reg (const IOSpecialReg *reg, unsigned char nv) |
IO register interface set method, see IOSpecialRegClient. More... | |
![]() | |
unsigned char | get_from_client (const IOSpecialReg *reg, unsigned char v) |
IO register interface get method, see IOSpecialRegClient. More... | |
Private Attributes | |
IOSpecialReg * | asyncRegister |
instance of IO register with assr bits More... | |
PinAtPort | tosc_pin |
input pin for external timer oscillator More... | |
bool | pinstate |
saved pin status of osc. pin More... | |
bool | clockselect |
holds the clock select state, true is external clock More... | |
int | clockSelectBit |
holds bit position of counter clock select More... | |
Additional Inherited Members | |
![]() | |
IOSpecialReg * | resetRegister |
instance of IO register with reset bits More... | |
unsigned short | preScaleValue |
prescaler counter value More... | |
bool | countEnable |
Extends HWPrescaler with a external clock oszillator pin.
Definition at line 83 of file timerprescaler.h.
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.
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.
|
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.
|
protectedvirtual |
IO register interface set method, see IOSpecialRegClient.
Reimplemented from HWPrescaler.
Definition at line 142 of file timerprescaler.cpp.
References asyncRegister, clockselect, clockSelectBit, and HWPrescaler::set_from_reg().
|
private |
instance of IO register with assr bits
Definition at line 111 of file timerprescaler.h.
Referenced by HWPrescalerAsync(), and set_from_reg().
|
private |
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().
|
private |
holds bit position of counter clock select
Definition at line 115 of file timerprescaler.h.
Referenced by set_from_reg().
|
private |
saved pin status of osc. pin
Definition at line 113 of file timerprescaler.h.
Referenced by CpuCycle(), and HWPrescalerAsync().
|
private |
input pin for external timer oscillator
Definition at line 112 of file timerprescaler.h.
Referenced by CpuCycle(), and HWPrescalerAsync().