summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/rs232/exorterm.h
blob: 76f1abc65632ef5dab213f52056c189537ac437d (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
// license:BSD-3-Clause
// copyright-holders:68bit

#ifndef MAME_BUS_RS232_EXORTERM_H
#define MAME_BUS_RS232_EXORTERM_H

#pragma once

#include "rs232.h"
#include "machine/exorterm.h"


class exorterm155_terminal_device : public device_t, public device_rs232_port_interface
{
public:
	exorterm155_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);

	virtual DECLARE_WRITE_LINE_MEMBER(input_txd) override;

	DECLARE_INPUT_CHANGED_MEMBER(flow_control);

protected:
	virtual void device_start() override;
	virtual void device_reset() override;
	virtual void device_add_mconfig(machine_config &config) override;
	virtual ioport_constructor device_input_ports() const override;

private:
	required_device<exorterm155_device> m_exorterm155;
	required_ioport m_flow_control;

	DECLARE_WRITE_LINE_MEMBER(route_term_rts);
	DECLARE_WRITE_LINE_MEMBER(route_term_dtr);

	int m_dtr;
};

DECLARE_DEVICE_TYPE(SERIAL_TERMINAL_EXORTERM155, exorterm155_terminal_device)

#endif // MAME_BUS_RS232_EXORTERM_H