OXYGENHUB
◆ main openmsx / src / serial / RS232Device.cc
1.6 KiB · C++ · last changed chore(): initial commit 1 month ago source blame history raw
1
#include "RS232Device.hh"
2
3
namespace openmsx {
4
5
zstring_view RS232Device::getClass() const
6
{
7
	return "RS232";
8
}
9
10
void RS232Device::setDataBits(DataBits /*bits*/)
11
{
12
	// ignore
13
}
14
15
void RS232Device::setStopBits(StopBits /*bits*/)
16
{
17
	// ignore
18
}
19
20
void RS232Device::setParityBit(bool /*enable*/, Parity /*parity*/)
21
{
22
	// ignore
23
}
24
25
// The input lines of the RS-232 port without any plugged in device
26
// are left floating (bits read as 1 in the IO ports), with the exception
27
// of the following devices:
28
//
29
// Spectravideo SVI-738 : Inputs are pull-up (Read as 0 in the IO ports)
30
// Spectravideo SVI-737 and SVI-757: Inputs are pull-down, behave
31
//                                   the same as left floating.
32
//
33
// This has been tested to be true for the SVI-738 and Toshiba HX-22,
34
// for the other devices the info comes from manuals, schematics, or
35
// circuit board pictures.
36
//
37
// Return an empty optional to indicate an unplugged input, in which case
38
// the configuration tag 'rs232_pullup' will be used as the
39
// effective value.
40
41
42
std::optional<bool> RS232Device::getCTS(EmuTime /*time*/) const
43
{
44
	return {};
45
}
46
47
std::optional<bool> RS232Device::getDSR(EmuTime /*time*/) const
48
{
49
	return {};
50
}
51
52
std::optional<bool> RS232Device::getDCD(EmuTime /*time*/) const
53
{
54
	return {};
55
}
56
57
std::optional<bool> RS232Device::getRI(EmuTime /*time*/) const
58
{
59
	return {};
60
}
61
62
void RS232Device::setDTR(bool /*status*/, EmuTime /*time*/)
63
{
64
	// ignore
65
}
66
67
void RS232Device::setRTS(bool /*status*/, EmuTime /*time*/)
68
{
69
	// ignore
70
}
71
72
void RS232Device::setBaudRate(unsigned /*baud*/)
73
{
74
	// ignore
75
}
76
77
} // namespace openmsx