diff options
Diffstat (limited to 'src/devices/bus/vcs_ctrl')
-rw-r--r-- | src/devices/bus/vcs_ctrl/ctrl.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/devices/bus/vcs_ctrl/ctrl.h b/src/devices/bus/vcs_ctrl/ctrl.h index 574a7dc3ae8..31f371d2fa8 100644 --- a/src/devices/bus/vcs_ctrl/ctrl.h +++ b/src/devices/bus/vcs_ctrl/ctrl.h @@ -15,6 +15,22 @@ #pragma once + + +//************************************************************************** +// INTERFACE CONFIGURATION MACROS +//************************************************************************** + +#define MCFG_VCS_CONTROL_PORT_ADD(_tag, _slot_intf, _def_slot) \ + MCFG_DEVICE_ADD(_tag, VCS_CONTROL_PORT, 0) \ + MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) + + +#define MCFG_VCS_CONTROL_PORT_TRIGGER_CALLBACK(_write) \ + downcast<vcs_control_port_device &>(*device).set_trigger_wr_callback(DEVCB_##_write); + + + //************************************************************************** // TYPE DEFINITIONS //************************************************************************** @@ -63,6 +79,7 @@ public: vcs_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); // static configuration helpers + template <class Object> devcb_base &set_trigger_wr_callback(Object &&cb) { return m_write_trigger.set_callback(std::forward<Object>(cb)); } auto trigger_wr_callback() { return m_write_trigger.bind(); } // computer interface |