From f9f4a7498611082079ae4acd2d421a857cab30d8 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Thu, 22 Jan 2004 19:02:07 -0500 Subject: added the 8254 programmable interval timer --HG-- extra : convert_revision : 6a111db98c05a3dd692c757611c3eb9c8cfdd32f --- dev/tsunami_io.hh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'dev/tsunami_io.hh') diff --git a/dev/tsunami_io.hh b/dev/tsunami_io.hh index 943df77c2..1336a703e 100644 --- a/dev/tsunami_io.hh +++ b/dev/tsunami_io.hh @@ -41,15 +41,41 @@ */ class TsunamiIO : public MmapDevice { + public: protected: + class ClockEvent : public Event + { + protected: + Tick interval; + uint8_t mode; + uint8_t status; + + public: + ClockEvent(); + + virtual void process(); + virtual const char *description(); + void Program(int count); + void ChangeMode(uint8_t mode); + uint8_t Status(); + + }; + + uint8_t mask1; uint8_t mask2; uint8_t mode1; uint8_t mode2; + ClockEvent timer0; + ClockEvent timer1; + ClockEvent timer2; + + uint32_t timerData; + public: TsunamiIO(const std::string &name, /*Tsunami *t,*/ Addr addr, Addr mask, MemoryController *mmu); -- cgit v1.2.3