diff options
Diffstat (limited to 'src/dev/mc146818.hh')
-rw-r--r-- | src/dev/mc146818.hh | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/dev/mc146818.hh b/src/dev/mc146818.hh index 76cd40c37..936f597d0 100644 --- a/src/dev/mc146818.hh +++ b/src/dev/mc146818.hh @@ -51,6 +51,7 @@ class MC146818 : public EventManager { MC146818 * parent; Tick interval; + Tick offset; RTCEvent(MC146818 * _parent, Tick i); @@ -68,11 +69,11 @@ class MC146818 : public EventManager struct RTCTickEvent : public Event { MC146818 * parent; + Tick offset; - RTCTickEvent(MC146818 * _parent) : parent(_parent) - { - parent->schedule(this, curTick() + SimClock::Int::s); - } + RTCTickEvent(MC146818 * _parent) : + parent(_parent), offset(SimClock::Int::s) + {} /** Event process to occur at interrupt*/ void process(); @@ -153,6 +154,9 @@ class MC146818 : public EventManager bool bcd, Tick frequency); virtual ~MC146818(); + /** Start ticking */ + virtual void startup(); + /** RTC write data */ void writeData(const uint8_t addr, const uint8_t data); |