summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine/rp5h01.h
blob: e784fa4f15fbf80dfbc10aaf4165fb5cfcdecfd3 (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
/***************************************************************************

    RP5H01


***************************************************************************/

#ifndef __RP5H01_H__
#define __RP5H01_H__

#include "devlegcy.h"

/***************************************************************************
    MACROS / CONSTANTS
***************************************************************************/

class rp5h01_device : public device_t
{
public:
	rp5h01_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
	~rp5h01_device() { global_free(m_token); }

	// access to legacy token
	void *token() const { assert(m_token != NULL); return m_token; }
protected:
	// device-level overrides
	virtual void device_config_complete();
	virtual void device_start();
	virtual void device_reset();
private:
	// internal state
	void *m_token;
};

extern const device_type RP5H01;


#define MCFG_RP5H01_ADD(_tag) \
	MCFG_DEVICE_ADD(_tag, RP5H01, 0)

/*
 * Device uses memory region
 * with the same tag as the one
 * assigned to device.
 */

/***************************************************************************
    PROTOTYPES
***************************************************************************/

DECLARE_WRITE8_DEVICE_HANDLER( rp5h01_enable_w );	/* /CE */
DECLARE_WRITE8_DEVICE_HANDLER( rp5h01_reset_w );	/* RESET */
DECLARE_WRITE8_DEVICE_HANDLER( rp5h01_cs_w );	/* CS */
DECLARE_WRITE8_DEVICE_HANDLER( rp5h01_clock_w );	/* DATA CLOCK (active low) */
DECLARE_WRITE8_DEVICE_HANDLER( rp5h01_test_w );		/* TEST */
DECLARE_READ8_DEVICE_HANDLER( rp5h01_counter_r );	/* COUNTER OUT */
DECLARE_READ8_DEVICE_HANDLER( rp5h01_data_r );		/* DATA */

#endif /* __RP5H01_H__ */