simulavr  1.1.0
Hardware Class Reference

#include <hardware.h>

Inheritance diagram for Hardware:

Public Member Functions

 Hardware (AvrDevice *core)
 
virtual ~Hardware ()
 
virtual unsigned int CpuCycle (void)
 
virtual void Reset (void)
 
virtual void ClearIrqFlag (unsigned int vector)
 
virtual bool IsLevelInterrupt (unsigned int vector)
 
virtual bool LevelInterruptPending (unsigned int vector)
 

Detailed Description

Hardware objects are the subsystems of an AVR device. They have a clock and reset input and in addition will define various memory registers through which they can be accessed.

Definition at line 34 of file hardware.h.

Constructor & Destructor Documentation

◆ Hardware()

Hardware::Hardware ( AvrDevice core)

Creates new Hardware and makes it part of the given AvrDevice hw. The hardware will receive all reset signals from the AVR, but must register clock cycling needs itself.

Definition at line 29 of file hardware.cpp.

References AvrDevice::AddToResetList().

◆ ~Hardware()

virtual Hardware::~Hardware ( )
inlinevirtual

Definition at line 41 of file hardware.h.

Member Function Documentation

◆ ClearIrqFlag()

virtual void Hardware::ClearIrqFlag ( unsigned int  vector)
inlinevirtual

This signals the hardware that the given IRQ vector has been handled by the AVR core.

Reimplemented in HWAd, HWUart, HWSpi, HWAcomp, HWPcir, HWEeprom, TimerIRQRegister, and ExternalIRQHandler.

Definition at line 54 of file hardware.h.

Referenced by HWIrqSystem::GetNewPc().

◆ CpuCycle()

virtual unsigned int Hardware::CpuCycle ( void  )
inlinevirtual

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 in HWTimerTinyX5, HWAd, CLKPRRegister, HWUart, HWSpi, HWPrescalerAsync, FlashProgramming, HWEeprom, BasicTimerUnit, HWPrescaler, and HWWado.

Definition at line 46 of file hardware.h.

Referenced by AvrDevice::Step().

◆ IsLevelInterrupt()

virtual bool Hardware::IsLevelInterrupt ( unsigned int  vector)
inlinevirtual

Does the hardware have a level interrupt (triggered otherwise, the default!)

Reimplemented in ExternalIRQHandler.

Definition at line 57 of file hardware.h.

Referenced by HWIrqSystem::GetNewPc().

◆ LevelInterruptPending()

virtual bool Hardware::LevelInterruptPending ( unsigned int  vector)
inlinevirtual

Check a level interrupt on the time, where interrupt routine will be called

Reimplemented in ExternalIRQHandler.

Definition at line 60 of file hardware.h.

Referenced by HWIrqSystem::GetNewPc().

◆ Reset()

virtual void Hardware::Reset ( void  )
inlinevirtual

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