summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/bus/rs232/null_modem.c
blob: e477faf5906cb26fc3d230c68d0f66d1aa1d0cea (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
#include "null_modem.h"

const device_type NULL_MODEM = &device_creator<null_modem_device>;

null_modem_device::null_modem_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
	: device_t(mconfig, NULL_MODEM, "Null Modem", tag, owner, clock, "null_modem", __FILE__),
	device_rs232_port_interface(mconfig, *this),
	m_bitbanger(*this, "bitbanger")
{
}

static bitbanger_config null_modem_image_config =
{
	DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, null_modem_device, read),
	BITBANGER_MODEM,
	BITBANGER_9600,
	BITBANGER_0PERCENT
};

static MACHINE_CONFIG_FRAGMENT(null_modem_config)
	MCFG_BITBANGER_ADD("bitbanger", null_modem_image_config);
MACHINE_CONFIG_END

machine_config_constructor null_modem_device::device_mconfig_additions() const
{
	return MACHINE_CONFIG_NAME(null_modem_config);
}