summaryrefslogtreecommitdiffstats
path: root/src/mame/machine/ibm6580_kbd.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/machine/ibm6580_kbd.h')
-rw-r--r--src/mame/machine/ibm6580_kbd.h15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/mame/machine/ibm6580_kbd.h b/src/mame/machine/ibm6580_kbd.h
index f39ce79857b..4796503ba58 100644
--- a/src/mame/machine/ibm6580_kbd.h
+++ b/src/mame/machine/ibm6580_kbd.h
@@ -6,23 +6,14 @@
#pragma once
-#define MCFG_DW_KEYBOARD_OUT_DATA_HANDLER(_devcb) \
- devcb = &downcast<dw_keyboard_device &>(*device).set_out_data_handler(DEVCB_##_devcb);
-
-#define MCFG_DW_KEYBOARD_OUT_CLOCK_HANDLER(_devcb) \
- devcb = &downcast<dw_keyboard_device &>(*device).set_out_clock_handler(DEVCB_##_devcb);
-
-#define MCFG_DW_KEYBOARD_OUT_STROBE_HANDLER(_devcb) \
- devcb = &downcast<dw_keyboard_device &>(*device).set_out_strobe_handler(DEVCB_##_devcb);
-
class dw_keyboard_device : public device_t
{
public:
dw_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_out_data_handler(Object &&cb) { return m_out_data.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_clock_handler(Object &&cb) { return m_out_clock.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_strobe_handler(Object &&cb) { return m_out_strobe.set_callback(std::forward<Object>(cb)); }
+ auto out_data_handler() { return m_out_data.bind(); }
+ auto out_clock_handler() { return m_out_clock.bind(); }
+ auto out_strobe_handler() { return m_out_strobe.bind(); }
DECLARE_WRITE_LINE_MEMBER(reset_w);
DECLARE_WRITE_LINE_MEMBER(ack_w);