File:  [Isaki's NoNo m68k/m88k emulator] / nono / host / comdriver_stdio.h
Revision 1.1.1.4 (vendor branch): download - view: text, annotated - select for diffs
Wed Apr 29 17:05:47 2026 UTC (2 months, 3 weeks ago) by root
Branches: MAIN, Isaki
CVS tags: v027, v026, v025, v024, HEAD
nono 1.4.0

//
// nono
// Copyright (C) 2021 nono project
// Licensed under nono-license.txt
//

//
// シリアルポートの標準入出力ドライバ
//

#pragma once

#include "comdriver.h"
#include <termios.h>

class COMDriverStdio : public COMDriver
{
	using inherited = COMDriver;
 public:
	explicit COMDriverStdio(HostDevice *hostdev_);
	~COMDriverStdio() override;

	bool InitDriver(bool startup) override;
	int Read() override;
	void Write(uint32 data) override;

 private:
	struct termios oldtc {};
	bool tc_changed {};

	// stdio を使えるのは同時に1人だけに限定する。
	static bool stdio_occupied;
};

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.