#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().
virtual Hardware::~Hardware | ( | ) | [inline, virtual] |
Definition at line 41 of file hardware.h.
virtual void Hardware::ClearIrqFlag | ( | unsigned int | vector | ) | [inline, virtual] |
This signals the hardware that the given IRQ vector has been handled by the AVR core.
Reimplemented in ExternalIRQHandler, HWAcomp, HWAd, HWEeprom, HWPcir, HWSpi, TimerIRQRegister, HWUart, and SwigDirector_Hardware.
Definition at line 54 of file hardware.h.
Referenced by HWIrqSystem::GetNewPc().
virtual unsigned int Hardware::CpuCycle | ( | void | ) | [inline, 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 in FlashProgramming, HWAd, HWEeprom, HWSpi, BasicTimerUnit, HWPrescaler, HWPrescalerAsync, HWUart, HWWado, and SwigDirector_Hardware.
Definition at line 46 of file hardware.h.
Referenced by AvrDevice::Step().
virtual bool Hardware::IsLevelInterrupt | ( | unsigned int | vector | ) | [inline, virtual] |
Does the hardware have a level interrupt (triggered otherwise, the default!)
Reimplemented in ExternalIRQHandler, and SwigDirector_Hardware.
Definition at line 57 of file hardware.h.
Referenced by HWIrqSystem::GetNewPc().
virtual bool Hardware::LevelInterruptPending | ( | unsigned int | vector | ) | [inline, virtual] |
Check a level interrupt on the time, where interrupt routine will be called
Reimplemented in ExternalIRQHandler, and SwigDirector_Hardware.
Definition at line 60 of file hardware.h.
Referenced by HWIrqSystem::GetNewPc().
virtual void Hardware::Reset | ( | void | ) | [inline, virtual] |
Implement the hardware's reset functionality here. The default is no action on reset.
Reimplemented in ExternalIRQHandler, FlashProgramming, HWAcomp, HWAdmux, HWAd, HWEeprom, HWPcir, HWPort, HWSpi, BasicTimerUnit, HWTimer8, HWTimer16, HWTimer8_0C, HWTimer8_1C, HWTimer8_2C, HWTimer16_1C, HWTimer16_2C2, HWTimer16_2C3, HWTimer16_3C, TimerIRQRegister, HWPrescaler, HWUart, HWWado, AddressExtensionRegister, SwigDirector_Hardware, and GPIORegister.
Definition at line 50 of file hardware.h.