simulavr  1.1.0
HWWado Class Reference

#include <hwwado.h>

Inheritance diagram for HWWado:

Public Member Functions

 HWWado (AvrDevice *)
 
virtual unsigned int CpuCycle ()
 
void SetWdtcr (unsigned char val)
 
unsigned char GetWdtcr ()
 
void Wdr ()
 
void Reset ()
 
- Public Member Functions inherited from Hardware
 Hardware (AvrDevice *core)
 
virtual ~Hardware ()
 
virtual void ClearIrqFlag (unsigned int vector)
 
virtual bool IsLevelInterrupt (unsigned int vector)
 
virtual bool LevelInterruptPending (unsigned int vector)
 
- Public Member Functions inherited from TraceValueRegister
 TraceValueRegister (TraceValueRegister *parent, const std::string &name)
 Create a TraceValueRegister, with a scope prefix built on parent scope + name. More...
 
 TraceValueRegister ()
 Create a TraceValueRegister, with a empty scope name, single device application. More...
 
virtual ~TraceValueRegister ()
 
const std::string GetTraceValuePrefix (void)
 Returns the scope prefix. More...
 
const std::string GetScopeName (void)
 Returns the scope name. More...
 
void RegisterTraceValue (TraceValue *t)
 Registers a TraceValue for this register. More...
 
void UnregisterTraceValue (TraceValue *t)
 Unregisters a TraceValue, remove it from register. More...
 
TraceValueRegisterGetScopeGroupByName (const std::string &name)
 Get a here registered TraceValueRegister by it's name. More...
 
virtual TraceValueGetTraceValueByName (const std::string &name)
 Get a here registered TraceValue by it's name. More...
 
TraceValueRegisterFindScopeGroupByName (const std::string &name)
 Seek for a TraceValueRegister by it's name. More...
 
TraceValueFindTraceValueByName (const std::string &name)
 Seek for a TraceValue by it's name. More...
 
TraceSetGetAllTraceValues (void)
 Get all here registered TraceValue's only (not with descending values) More...
 
TraceSetGetAllTraceValuesRecursive (void)
 Get all here registered TraceValue's with descending values. More...
 

Public Attributes

IOReg< HWWadowdtcr_reg
 

Protected Attributes

unsigned char wdtcr
 
unsigned char cntWde
 
SystemClockOffset timeOutAt
 
AvrDevicecore
 

Additional Inherited Members

- Protected Member Functions inherited from TraceValueRegister
virtual size_t _tvr_getValuesCount (void)
 Get the count of all TraceValues, that are registered here and descending. More...
 
virtual void _tvr_insertTraceValuesToSet (TraceSet &t)
 Insert all TraceValues into TraceSet, that registered here and descending. More...
 

Detailed Description

Watchdog (WDT) peripheral. Interrupts are not implemented.

Definition at line 38 of file hwwado.h.

Constructor & Destructor Documentation

◆ HWWado()

HWWado::HWWado ( AvrDevice c)

Definition at line 68 of file hwwado.cpp.

References AvrDevice::AddToCycleList(), core, and Reset().

Member Function Documentation

◆ CpuCycle()

unsigned int HWWado::CpuCycle ( void  )
virtual

Called for each AVR cycle when this hardware has registered itself as a receiver for AVR clocks. Returns nonzero if instructions should not be executed (e.g. a Flash write is in progress).

Reimplemented from Hardware.

Definition at line 52 of file hwwado.cpp.

References cntWde, core, SystemClock::GetCurrentTime(), SystemClock::Instance(), AvrDevice::Reset(), timeOutAt, WDE, wdtcr, and WDTOE.

◆ GetWdtcr()

unsigned char HWWado::GetWdtcr ( )
inline

Definition at line 50 of file hwwado.h.

References Reset(), Wdr(), and wdtcr.

◆ Reset()

void HWWado::Reset ( void  )
virtual

Implement the hardware's reset functionality here. The default is no action on reset.

Reimplemented from Hardware.

Definition at line 78 of file hwwado.cpp.

References cntWde, timeOutAt, and wdtcr.

Referenced by GetWdtcr(), and HWWado().

◆ SetWdtcr()

void HWWado::SetWdtcr ( unsigned char  val)

Definition at line 34 of file hwwado.cpp.

References cntWde, WDE, wdtcr, and WDTOE.

◆ Wdr()

void HWWado::Wdr ( )

Definition at line 85 of file hwwado.cpp.

References SystemClock::GetCurrentTime(), SystemClock::Instance(), timeOutAt, and wdtcr.

Referenced by GetWdtcr(), and avr_op_WDR::operator()().

Member Data Documentation

◆ cntWde

unsigned char HWWado::cntWde
protected

Definition at line 41 of file hwwado.h.

Referenced by CpuCycle(), Reset(), and SetWdtcr().

◆ core

AvrDevice* HWWado::core
protected

Definition at line 43 of file hwwado.h.

Referenced by CpuCycle(), and HWWado().

◆ timeOutAt

SystemClockOffset HWWado::timeOutAt
protected

Definition at line 42 of file hwwado.h.

Referenced by CpuCycle(), Reset(), and Wdr().

◆ wdtcr

unsigned char HWWado::wdtcr
protected

Definition at line 40 of file hwwado.h.

Referenced by CpuCycle(), GetWdtcr(), Reset(), SetWdtcr(), and Wdr().

◆ wdtcr_reg


The documentation for this class was generated from the following files: