|
|
1.1 root 1: //
2: // nono
3: // Copyright (C) 2024 nono project
4: // Licensed under nono-license.txt
5: //
6:
7: //
8: // シリアルポートのメイン画面コンソール入出力ドライバ
9: //
10:
11: #pragma once
12:
13: #include "comdriver.h"
14: #include "autofd.h"
15:
16: class ConsoleDevice;
17:
18: class COMDriverCons : public COMDriver
19: {
20: using inherited = COMDriver;
21: public:
22: explicit COMDriverCons(HostDevice *hostdev_);
23: ~COMDriverCons() override;
24:
25: bool InitDriver() override;
26: int Read() override;
27: void Write(uint32 data) override;
28:
29: void EnqueueChar(uint charcode);
30:
31: private:
32: // VM側 (UI スレッド) からの連絡用。
33: autofd rxpipe {};
34: autofd txpipe {};
35:
36: ConsoleDevice *console {};
37: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.