diff options
Diffstat (limited to 'src/devices/machine/tmp68301.h')
-rw-r--r-- | src/devices/machine/tmp68301.h | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/devices/machine/tmp68301.h b/src/devices/machine/tmp68301.h index eae1cd69a48..5b936ebc88b 100644 --- a/src/devices/machine/tmp68301.h +++ b/src/devices/machine/tmp68301.h @@ -7,22 +7,8 @@ #include "cpu/m68000/m68000.h" -//************************************************************************** -// INTERFACE CONFIGURATION MACROS -//************************************************************************** - /* TODO: serial ports, frequency & hook it up with m68k */ -// FIXME: M68000 ought to be a parent class, not an external object -#define MCFG_TMP68301_CPU(_tag) \ - downcast<tmp68301_device &>(*device).set_cpu_tag(_tag); - -#define MCFG_TMP68301_IN_PARALLEL_CB(cb) \ - downcast<tmp68301_device &>(*device).set_in_parallel_callback((DEVCB_##cb)); - -#define MCFG_TMP68301_OUT_PARALLEL_CB(cb) \ - downcast<tmp68301_device &>(*device).set_out_parallel_callback((DEVCB_##cb)); - //************************************************************************** // TYPE DEFINITIONS @@ -36,9 +22,9 @@ class tmp68301_device : public device_t, public: tmp68301_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - void set_cpu_tag(const char *tag) { m_cpu.set_tag(tag); } - template <class Object> devcb_base &set_in_parallel_callback(Object &&cb) { return m_in_parallel_cb.set_callback(std::forward<Object>(cb)); } - template <class Object> devcb_base &set_out_parallel_callback(Object &&cb) { return m_out_parallel_cb.set_callback(std::forward<Object>(cb)); } + template <typename T> void set_cputag(T &&tag) { m_cpu.set_tag(std::forward<T>(tag)); } // FIXME: M68000 ought to be a parent class, not an external object + auto in_parallel_callback() { return m_in_parallel_cb.bind(); } + auto out_parallel_callback() { return m_out_parallel_cb.bind(); } // Hardware Registers DECLARE_READ16_MEMBER( regs_r ); |