mc146818.hh (5392:c3a45fac35f8) | mc146818.hh (5606:6da7a58b0bc8) |
---|---|
1/* 2 * Copyright (c) 2004-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 23 unchanged lines hidden (view full) --- 32 33#ifndef __DEV_MC146818_HH__ 34#define __DEV_MC146818_HH__ 35 36#include "base/range.hh" 37#include "sim/eventq.hh" 38 39/** Real-Time Clock (MC146818) */ | 1/* 2 * Copyright (c) 2004-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 23 unchanged lines hidden (view full) --- 32 33#ifndef __DEV_MC146818_HH__ 34#define __DEV_MC146818_HH__ 35 36#include "base/range.hh" 37#include "sim/eventq.hh" 38 39/** Real-Time Clock (MC146818) */ |
40class MC146818 | 40class MC146818 : public EventManager |
41{ 42 protected: 43 virtual void handleEvent() 44 { 45 warn("No RTC event handler defined.\n"); 46 } 47 48 private: --- 42 unchanged lines hidden (view full) --- 91 92 /** RTC status register A */ 93 uint8_t stat_regA; 94 95 /** RTC status register B */ 96 uint8_t stat_regB; 97 98 public: | 41{ 42 protected: 43 virtual void handleEvent() 44 { 45 warn("No RTC event handler defined.\n"); 46 } 47 48 private: --- 42 unchanged lines hidden (view full) --- 91 92 /** RTC status register A */ 93 uint8_t stat_regA; 94 95 /** RTC status register B */ 96 uint8_t stat_regB; 97 98 public: |
99 virtual ~MC146818() 100 {} 101 102 MC146818(const std::string &name, const struct tm time, | 99 MC146818(EventManager *em, const std::string &name, const struct tm time, |
103 bool bcd, Tick frequency); | 100 bool bcd, Tick frequency); |
101 virtual ~MC146818(); |
|
104 105 /** RTC write data */ 106 void writeData(const uint8_t addr, const uint8_t data); 107 108 /** RTC read data */ 109 uint8_t readData(const uint8_t addr); 110 111 /** --- 17 unchanged lines hidden --- | 102 103 /** RTC write data */ 104 void writeData(const uint8_t addr, const uint8_t data); 105 106 /** RTC read data */ 107 uint8_t readData(const uint8_t addr); 108 109 /** --- 17 unchanged lines hidden --- |