blob: 987fe5b48c51f5f42878f79276f107508c57408d (
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
69
70
71
72
73
74
|
/*********************************************************************
6850acia.h
6850 ACIA code
*********************************************************************/
#ifndef __ACIA6850_H__
#define __ACIA6850_H__
/***************************************************************************
MACROS
***************************************************************************/
#define ACIA6850 DEVICE_GET_INFO_NAME(acia6850)
#define ACIA6850_STATUS_RDRF 0x01
#define ACIA6850_STATUS_TDRE 0x02
#define ACIA6850_STATUS_DCD 0x04
#define ACIA6850_STATUS_CTS 0x08
#define ACIA6850_STATUS_FE 0x10
#define ACIA6850_STATUS_OVRN 0x20
#define ACIA6850_STATUS_PE 0x40
#define ACIA6850_STATUS_IRQ 0x80
#define MDRV_ACIA6850_ADD(_tag, _config) \
MDRV_DEVICE_ADD(_tag, ACIA6850, 0) \
MDRV_DEVICE_CONFIG(_config)
#define ACIA6850_INTERFACE(_name) \
const acia6850_interface(_name) =
/***************************************************************************
TYPE DEFINITIONS
***************************************************************************/
typedef struct _acia6850_interface acia6850_interface;
struct _acia6850_interface
{
int tx_clock;
int rx_clock;
devcb_read_line in_rx_func;
devcb_write_line out_tx_func;
devcb_read_line in_cts_func;
devcb_write_line out_rts_func;
devcb_read_line in_dcd_func;
devcb_write_line out_irq_func;
};
/***************************************************************************
FUNCTION PROTOTYPES
***************************************************************************/
DEVICE_GET_INFO( acia6850 );
void acia6850_tx_clock_in(running_device *device) ATTR_NONNULL(1);
void acia6850_rx_clock_in(running_device *device) ATTR_NONNULL(1);
void acia6850_set_rx_clock(running_device *device, int clock) ATTR_NONNULL(1);
void acia6850_set_tx_clock(running_device *device, int clock) ATTR_NONNULL(1);
WRITE8_DEVICE_HANDLER( acia6850_ctrl_w );
READ8_DEVICE_HANDLER( acia6850_stat_r );
WRITE8_DEVICE_HANDLER( acia6850_data_w );
READ8_DEVICE_HANDLER( acia6850_data_r );
#endif /* __ACIA6850_H__ */
|