diff options
Diffstat (limited to 'src/devices/bus/pc_kbd/pc_kbdc.h')
-rw-r--r-- | src/devices/bus/pc_kbd/pc_kbdc.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/devices/bus/pc_kbd/pc_kbdc.h b/src/devices/bus/pc_kbd/pc_kbdc.h index ff1168c314c..dac06daf60f 100644 --- a/src/devices/bus/pc_kbd/pc_kbdc.h +++ b/src/devices/bus/pc_kbd/pc_kbdc.h @@ -17,6 +17,21 @@ set the data line and then set the clock line. //************************************************************************** +// INTERFACE CONFIGURATION MACROS +//************************************************************************** + +#define MCFG_PC_KBDC_OUT_CLOCK_CB(_devcb) \ + downcast<pc_kbdc_device &>(*device).set_out_clock_callback(DEVCB_##_devcb); + +#define MCFG_PC_KBDC_OUT_DATA_CB(_devcb) \ + downcast<pc_kbdc_device &>(*device).set_out_data_callback(DEVCB_##_devcb); + +#define MCFG_PC_KBDC_SLOT_ADD(_kbdc_tag, _tag, _slot_intf, _def_slot) \ + MCFG_DEVICE_ADD(_tag, PC_KBDC_SLOT, 0 ) \ + MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \ + downcast<pc_kbdc_slot_device &>(*device).set_pc_kbdc_slot(subdevice(_kbdc_tag) ); + +//************************************************************************** // TYPE DEFINITIONS //************************************************************************** @@ -61,6 +76,8 @@ public: // construction/destruction pc_kbdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + template <class Object> devcb_base &set_out_clock_callback(Object &&cb) { return m_out_clock_cb.set_callback(std::forward<Object>(cb)); } + template <class Object> devcb_base &set_out_data_callback(Object &&cb) { return m_out_data_cb.set_callback(std::forward<Object>(cb)); } auto out_clock_cb() { return m_out_clock_cb.bind(); } auto out_data_cb() { return m_out_data_cb.bind(); } |