summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/i8251.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/i8251.h')
-rw-r--r--src/devices/machine/i8251.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/devices/machine/i8251.h b/src/devices/machine/i8251.h
index a475e39ae36..4eab12602d9 100644
--- a/src/devices/machine/i8251.h
+++ b/src/devices/machine/i8251.h
@@ -20,25 +20,25 @@
//**************************************************************************
#define MCFG_I8251_TXD_HANDLER(_devcb) \
- devcb = &downcast<i8251_device &>(*device).set_txd_handler(DEVCB_##_devcb);
+ downcast<i8251_device &>(*device).set_txd_handler(DEVCB_##_devcb);
#define MCFG_I8251_DTR_HANDLER(_devcb) \
- devcb = &downcast<i8251_device &>(*device).set_dtr_handler(DEVCB_##_devcb);
+ downcast<i8251_device &>(*device).set_dtr_handler(DEVCB_##_devcb);
#define MCFG_I8251_RTS_HANDLER(_devcb) \
- devcb = &downcast<i8251_device &>(*device).set_rts_handler(DEVCB_##_devcb);
+ downcast<i8251_device &>(*device).set_rts_handler(DEVCB_##_devcb);
#define MCFG_I8251_RXRDY_HANDLER(_devcb) \
- devcb = &downcast<i8251_device &>(*device).set_rxrdy_handler(DEVCB_##_devcb);
+ downcast<i8251_device &>(*device).set_rxrdy_handler(DEVCB_##_devcb);
#define MCFG_I8251_TXRDY_HANDLER(_devcb) \
- devcb = &downcast<i8251_device &>(*device).set_txrdy_handler(DEVCB_##_devcb);
+ downcast<i8251_device &>(*device).set_txrdy_handler(DEVCB_##_devcb);
#define MCFG_I8251_TXEMPTY_HANDLER(_devcb) \
- devcb = &downcast<i8251_device &>(*device).set_txempty_handler(DEVCB_##_devcb);
+ downcast<i8251_device &>(*device).set_txempty_handler(DEVCB_##_devcb);
#define MCFG_I8251_SYNDET_HANDLER(_devcb) \
- devcb = &downcast<i8251_device &>(*device).set_syndet_handler(DEVCB_##_devcb);
+ downcast<i8251_device &>(*device).set_syndet_handler(DEVCB_##_devcb);
class i8251_device : public device_t,
public device_serial_interface
@@ -55,6 +55,13 @@ public:
template <class Object> devcb_base &set_txrdy_handler(Object &&cb) { return m_txrdy_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_txempty_handler(Object &&cb) { return m_txempty_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_syndet_handler(Object &&cb) { return m_syndet_handler.set_callback(std::forward<Object>(cb)); }
+ auto txd_handler() { return m_txd_handler.bind(); }
+ auto dtr_handler() { return m_dtr_handler.bind(); }
+ auto rts_handler() { return m_rts_handler.bind(); }
+ auto rxrdy_handler() { return m_rxrdy_handler.bind(); }
+ auto txrdy_handler() { return m_txrdy_handler.bind(); }
+ auto txempty_handler() { return m_txempty_handler.bind(); }
+ auto syndet_handler() { return m_syndet_handler.bind(); }
DECLARE_READ8_MEMBER(data_r);
DECLARE_WRITE8_MEMBER(data_w);