summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/7474.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/7474.h')
-rw-r--r--src/devices/machine/7474.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/devices/machine/7474.h b/src/devices/machine/7474.h
index 0f9d87fa5bf..0a6a678ddfb 100644
--- a/src/devices/machine/7474.h
+++ b/src/devices/machine/7474.h
@@ -45,6 +45,19 @@
#pragma once
+
+
+//**************************************************************************
+// INTERFACE CONFIGURATION MACROS
+//**************************************************************************
+
+#define MCFG_7474_OUTPUT_CB(_devcb) \
+ downcast<ttl7474_device &>(*device).set_output_cb(DEVCB_##_devcb);
+
+#define MCFG_7474_COMP_OUTPUT_CB(_devcb) \
+ downcast<ttl7474_device &>(*device).set_comp_output_cb(DEVCB_##_devcb);
+
+
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -58,6 +71,8 @@ public:
ttl7474_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration helpers
+ template <class Object> devcb_base &set_output_cb(Object &&cb) { return m_output_func.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_comp_output_cb(Object &&cb) { return m_comp_output_func.set_callback(std::forward<Object>(cb)); }
auto output_cb() { return m_output_func.bind(); }
auto comp_output_cb() { return m_comp_output_func.bind(); }