diff options
Diffstat (limited to 'src/devices/machine/mccs1850.h')
-rw-r--r-- | src/devices/machine/mccs1850.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/devices/machine/mccs1850.h b/src/devices/machine/mccs1850.h index 62b7f5d5afc..bd7771bc6a0 100644 --- a/src/devices/machine/mccs1850.h +++ b/src/devices/machine/mccs1850.h @@ -25,6 +25,22 @@ #include "dirtc.h" + +//************************************************************************** +// INTERFACE CONFIGURATION MACROS +//************************************************************************** + +#define MCFG_MCCS1850_INT_CALLBACK(_write) \ + downcast<mccs1850_device &>(*device).set_int_wr_callback(DEVCB_##_write); + +#define MCFG_MCCS1850_PSE_CALLBACK(_write) \ + downcast<mccs1850_device &>(*device).set_pse_wr_callback(DEVCB_##_write); + +#define MCFG_MCCS1850_NUC_CALLBACK(_write) \ + downcast<mccs1850_device &>(*device).set_nuc_wr_callback(DEVCB_##_write); + + + //************************************************************************** // TYPE DEFINITIONS //************************************************************************** @@ -39,9 +55,9 @@ public: // construction/destruction mccs1850_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - auto int_wr_callback() { return int_cb.bind(); } - auto pse_wr_callback() { return pse_cb.bind(); } - auto nuc_wr_callback() { return nuc_cb.bind(); } + template <class Object> devcb_base &set_int_wr_callback(Object &&cb) { return int_cb.set_callback(std::forward<Object>(cb)); } + template <class Object> devcb_base &set_pse_wr_callback(Object &&cb) { return pse_cb.set_callback(std::forward<Object>(cb)); } + template <class Object> devcb_base &set_nuc_wr_callback(Object &&cb) { return nuc_cb.set_callback(std::forward<Object>(cb)); } DECLARE_WRITE_LINE_MEMBER( ce_w ); DECLARE_WRITE_LINE_MEMBER( sck_w ); |