blob: 20c75e4099d55c83dcab8baac994963282137dd5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
// license:BSD-3-Clause
// copyright-holders:smf
#include "loopback.h"
const device_type RS232_LOOPBACK = &device_creator<rs232_loopback_device>;
rs232_loopback_device::rs232_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, RS232_LOOPBACK, "RS232 Loopback", tag, owner, clock, "rs232_loopback", __FILE__),
device_rs232_port_interface(mconfig, *this)
{
}
void rs232_loopback_device::device_start()
{
}
WRITE_LINE_MEMBER( rs232_loopback_device::input_txd )
{
if (started())
{
output_rxd(state);
}
}
WRITE_LINE_MEMBER( rs232_loopback_device::input_rts )
{
if (started())
{
output_ri(state);
output_cts(state);
}
}
WRITE_LINE_MEMBER( rs232_loopback_device::input_dtr )
{
if (started())
{
output_dsr(state);
output_dcd(state);
}
}
|