summaryrefslogtreecommitdiffstats
path: root/src/devices/bus/rs232/rs232.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/rs232/rs232.h')
-rw-r--r--src/devices/bus/rs232/rs232.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/devices/bus/rs232/rs232.h b/src/devices/bus/rs232/rs232.h
index c4db0af2313..b58f876cb48 100644
--- a/src/devices/bus/rs232/rs232.h
+++ b/src/devices/bus/rs232/rs232.h
@@ -9,28 +9,28 @@
#define MCFG_RS232_RXD_HANDLER(_devcb) \
- devcb = &downcast<rs232_port_device &>(*device).set_rxd_handler(DEVCB_##_devcb);
+ downcast<rs232_port_device &>(*device).set_rxd_handler(DEVCB_##_devcb);
#define MCFG_RS232_DCD_HANDLER(_devcb) \
- devcb = &downcast<rs232_port_device &>(*device).set_dcd_handler(DEVCB_##_devcb);
+ downcast<rs232_port_device &>(*device).set_dcd_handler(DEVCB_##_devcb);
#define MCFG_RS232_DSR_HANDLER(_devcb) \
- devcb = &downcast<rs232_port_device &>(*device).set_dsr_handler(DEVCB_##_devcb);
+ downcast<rs232_port_device &>(*device).set_dsr_handler(DEVCB_##_devcb);
#define MCFG_RS232_RI_HANDLER(_devcb) \
- devcb = &downcast<rs232_port_device &>(*device).set_ri_handler(DEVCB_##_devcb);
+ downcast<rs232_port_device &>(*device).set_ri_handler(DEVCB_##_devcb);
#define MCFG_RS232_SI_HANDLER(_devcb) \
- devcb = &downcast<rs232_port_device &>(*device).set_si_handler(DEVCB_##_devcb);
+ downcast<rs232_port_device &>(*device).set_si_handler(DEVCB_##_devcb);
#define MCFG_RS232_CTS_HANDLER(_devcb) \
- devcb = &downcast<rs232_port_device &>(*device).set_cts_handler(DEVCB_##_devcb);
+ downcast<rs232_port_device &>(*device).set_cts_handler(DEVCB_##_devcb);
#define MCFG_RS232_RXC_HANDLER(_devcb) \
- devcb = &downcast<rs232_port_device &>(*device).set_rxc_handler(DEVCB_##_devcb);
+ downcast<rs232_port_device &>(*device).set_rxc_handler(DEVCB_##_devcb);
#define MCFG_RS232_TXC_HANDLER(_devcb) \
- devcb = &downcast<rs232_port_device &>(*device).set_txc_handler(DEVCB_##_devcb);
+ downcast<rs232_port_device &>(*device).set_txc_handler(DEVCB_##_devcb);
#define RS232_BAUD_110 (0x00)
#define RS232_BAUD_150 (0x01)
@@ -143,6 +143,14 @@ public:
template <class Object> devcb_base &set_cts_handler(Object &&cb) { return m_cts_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_rxc_handler(Object &&cb) { return m_rxc_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_txc_handler(Object &&cb) { return m_txc_handler.set_callback(std::forward<Object>(cb)); }
+ auto rxd_handler() { return m_rxd_handler.bind(); }
+ auto dcd_handler() { return m_dcd_handler.bind(); }
+ auto dsr_handler() { return m_dsr_handler.bind(); }
+ auto ri_handler() { return m_ri_handler.bind(); }
+ auto si_handler() { return m_si_handler.bind(); }
+ auto cts_handler() { return m_cts_handler.bind(); }
+ auto rxc_handler() { return m_rxc_handler.bind(); }
+ auto txc_handler() { return m_txc_handler.bind(); }
DECLARE_WRITE_LINE_MEMBER( write_txd );
DECLARE_WRITE_LINE_MEMBER( write_dtr );