summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/wangpckb.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/machine/wangpckb.h')
-rw-r--r--src/mame/machine/wangpckb.h26
1 files changed, 3 insertions, 23 deletions
diff --git a/src/mame/machine/wangpckb.h b/src/mame/machine/wangpckb.h
index 320f0f57d01..8a8f513cac9 100644
--- a/src/mame/machine/wangpckb.h
+++ b/src/mame/machine/wangpckb.h
@@ -19,38 +19,18 @@
//**************************************************************************
-// MACROS / CONSTANTS
-//**************************************************************************
-
-#define WANGPC_KEYBOARD_TAG "wangpckb"
-
-
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_WANGPC_KEYBOARD_ADD() \
- MCFG_DEVICE_ADD(WANGPC_KEYBOARD_TAG, WANGPC_KEYBOARD, 0)
-
-#define MCFG_WANGPCKB_TXD_HANDLER(_devcb) \
- downcast<wangpc_keyboard_device &>(*device).set_txd_handler(DEVCB_##_devcb);
-
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> wangpc_keyboard_device
-class wangpc_keyboard_device : public device_t,
- public device_serial_interface
+class wangpc_keyboard_device : public device_t, public device_serial_interface
{
public:
// construction/destruction
- wangpc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ wangpc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
- template <class Object> devcb_base &set_txd_handler(Object &&cb) { return m_txd_handler.set_callback(std::forward<Object>(cb)); }
+ auto txd_handler() { return m_txd_handler.bind(); }
DECLARE_WRITE_LINE_MEMBER( write_rxd );