|
|
1.1 root 1: //
2: // nono
3: // Copyright (C) 2021 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: #include <termios.h>
16:
17: class COMDriverStdio : public COMDriver
18: {
19: using inherited = COMDriver;
20: public:
21: COMDriverStdio(HostDevice *hostdev_);
22: ~COMDriverStdio() override;
23:
24: bool InitDriver() override;
25: int Dispatch(int udata) override;
26: int Read() override;
27: void Write(uint32 data) override;
28:
29: private:
30: struct termios oldtc {};
31: char char_from_signal {};
32:
33: autofd sigfd {};
34: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.