blob: cf222f7a477bb4cc9661fef3e07c04e849c5320a (
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
// license:BSD-3-Clause
// copyright-holders:Curt Coder
/***************************************************************************
dirtc.c
Device Output interfaces.
***************************************************************************/
#include "emu.h"
//**************************************************************************
// DEVICE OUTPUT INTERFACE
//**************************************************************************
//-------------------------------------------------
// device_output_interface - constructor
//-------------------------------------------------
device_output_interface::device_output_interface(const machine_config &mconfig, device_t &device) :
device_interface(device, "output"),
m_output_index(0),
m_output_name(NULL)
{
}
//-------------------------------------------------
// device_output_interface - destructor
//-------------------------------------------------
device_output_interface::~device_output_interface()
{
}
void device_output_interface::set_output_value(int value)
{
if (m_output_name)
output_set_value(m_output_name, value);
else
fatalerror("Output name not set!");
}
void device_output_interface::set_led_value(int value)
{
if (m_output_name)
output_set_value(m_output_name, value);
else
output_set_led_value(m_output_index, value);
}
void device_output_interface::set_lamp_value(int value)
{
if (m_output_name)
output_set_value(m_output_name, value);
else
output_set_lamp_value(m_output_index, value);
}
void device_output_interface::set_digit_value(int value)
{
if (m_output_name)
output_set_value(m_output_name, value);
else
output_set_digit_value(m_output_index, value);
}
|