diff options
Diffstat (limited to 'src/devices/machine/i8355.h')
-rw-r--r-- | src/devices/machine/i8355.h | 41 |
1 files changed, 4 insertions, 37 deletions
diff --git a/src/devices/machine/i8355.h b/src/devices/machine/i8355.h index be2e83d17eb..9a6228d0fa0 100644 --- a/src/devices/machine/i8355.h +++ b/src/devices/machine/i8355.h @@ -34,49 +34,16 @@ #pragma once - - - -///************************************************************************* -// MACROS / CONSTANTS -///************************************************************************* - - - - -///************************************************************************* -// INTERFACE CONFIGURATION MACROS -///************************************************************************* - -#define MCFG_I8355_IN_PA_CB(_devcb) \ - downcast<i8355_device &>(*device).set_in_pa_callback(DEVCB_##_devcb); - -#define MCFG_I8355_OUT_PA_CB(_devcb) \ - downcast<i8355_device &>(*device).set_out_pa_callback(DEVCB_##_devcb); - -#define MCFG_I8355_IN_PB_CB(_devcb) \ - downcast<i8355_device &>(*device).set_in_pb_callback(DEVCB_##_devcb); - -#define MCFG_I8355_OUT_PB_CB(_devcb) \ - downcast<i8355_device &>(*device).set_out_pb_callback(DEVCB_##_devcb); - - -///************************************************************************* -// TYPE DEFINITIONS -///************************************************************************* - -// ======================> i8355_device - class i8355_device : public device_t { public: // construction/destruction i8355_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - template <class Object> devcb_base &set_in_pa_callback(Object &&cb) { return m_in_pa_cb.set_callback(std::forward<Object>(cb)); } - template <class Object> devcb_base &set_out_pa_callback(Object &&cb) { return m_out_pa_cb.set_callback(std::forward<Object>(cb)); } - template <class Object> devcb_base &set_in_pb_callback(Object &&cb) { return m_in_pb_cb.set_callback(std::forward<Object>(cb)); } - template <class Object> devcb_base &set_out_pb_callback(Object &&cb) { return m_out_pb_cb.set_callback(std::forward<Object>(cb)); } + auto in_pa() { return m_in_pa_cb.bind(); } + auto out_pa() { return m_out_pa_cb.bind(); } + auto in_pb() { return m_in_pb_cb.bind(); } + auto out_pb() { return m_out_pb_cb.bind(); } DECLARE_READ8_MEMBER( io_r ); DECLARE_WRITE8_MEMBER( io_w ); |