simulavr
1.1.0
|
#include <hardware.h>
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) |
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.
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().
|
inlinevirtual |
Definition at line 41 of file hardware.h.
|
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().
|
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().
|
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().
|
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().
|
inlinevirtual |
Implement the hardware's reset functionality here. The default is no action on reset.
Reimplemented in HWTimerTinyX5, HWTimer16_3C, HWTimer16_2C3, HWTimer16_2C2, HWTimer16_1C, HWTimer8_2C, HWTimer8_1C, HWTimer8_0C, HWTimer16, HWAd_SFIOR, HWAd, HWTimer8, HWUSI_BR, OSCCALRegister, XDIVRegister, HWUSI, CLKPRRegister, GPIORegister, HWUart, HWSpi, HWAcomp, HWPcir, FlashProgramming, HWEeprom, TimerIRQRegister, BasicTimerUnit, HWPrescaler, ExternalIRQHandler, HWPort, HWWado, and AddressExtensionRegister.
Definition at line 50 of file hardware.h.