summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/bus/rs232/null_modem.h
blob: 14c462b00fa1390edf389396f8e435a28ad645e7 (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
#ifndef NULL_MODEM_H_
#define NULL_MODEM_H_

#include "bus/rs232/rs232.h"
#include "imagedev/bitbngr.h"

class null_modem_device : public device_t,
	public device_rs232_port_interface
{
public:
	null_modem_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
	virtual machine_config_constructor device_mconfig_additions() const;

	WRITE_LINE_MEMBER( read ) { output_rxd(state); } /// HACK for DEVCB
	virtual WRITE_LINE_MEMBER( input_txd ) { m_bitbanger->output(state); }

protected:
	virtual void device_start() {}
	virtual void device_reset() { output_rxd(1); }

private:
	required_device<bitbanger_device> m_bitbanger;
};

extern const device_type NULL_MODEM;

#endif