|
|
1.1 root 1: //
2: // nono
1.1.1.3 root 3: // Copyright (C) 2020 nono project
4: // Licensed under nono-license.txt
1.1 root 5: //
6:
7: #pragma once
8:
9: #include "device.h"
10: #include "scheduler.h"
11:
12: class SysClkDevice
13: : public IODevice
14: {
1.1.1.3 root 15: using inherited = IODevice;
1.1 root 16: public:
17: SysClkDevice();
1.1.1.3 root 18: ~SysClkDevice() override;
1.1 root 19:
1.1.1.3 root 20: bool Init() override;
21: bool PowerOn() override;
1.1 root 22:
1.1.1.2 root 23: protected:
24: // BusIO インタフェース
25: static const uint32 NPORT = 1;
26: uint64 Read(uint32);
27: uint64 Write(uint32, uint32);
28: uint64 Peek(uint32);
1.1 root 29:
30: private:
31: // イベントコールバック
1.1.1.4 ! root 32: void Callback(Event& ev);
1.1 root 33:
1.1.1.2 root 34: // 割り込み状態をレジスタイメージにして返す
35: uint8 GetInt() const;
36:
1.1 root 37: // システムクロック割り込み有りなら true。
1.1.1.4 ! root 38: bool sysint {};
1.1 root 39:
40: // 割り込みイベント
41: Event event {};
42: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.