diff options
Diffstat (limited to 'src/devices/cpu/h8/h8_sci.h')
-rw-r--r-- | src/devices/cpu/h8/h8_sci.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/devices/cpu/h8/h8_sci.h b/src/devices/cpu/h8/h8_sci.h index 1c3a79b0f39..ea13f1f65a2 100644 --- a/src/devices/cpu/h8/h8_sci.h +++ b/src/devices/cpu/h8/h8_sci.h @@ -9,8 +9,10 @@ ***************************************************************************/ -#ifndef __H8_SCI_H__ -#define __H8_SCI_H__ +#ifndef MAME_CPU_H8_H8_SCI_H +#define MAME_CPU_H8_H8_SCI_H + +#pragma once #include "h8.h" #include "h8_intc.h" @@ -52,8 +54,8 @@ public: DECLARE_WRITE_LINE_MEMBER(rx_w); DECLARE_WRITE_LINE_MEMBER(clk_w); - template<class _Object> static devcb_base &set_tx_cb(device_t &device, _Object object) { return downcast<h8_sci_device &>(device).tx_cb.set_callback(object); } - template<class _Object> static devcb_base &set_clk_cb(device_t &device, _Object object) { return downcast<h8_sci_device &>(device).clk_cb.set_callback(object); } + template <class Object> static devcb_base &set_tx_cb(device_t &device, Object &&cb) { return downcast<h8_sci_device &>(device).tx_cb.set_callback(std::forward<Object>(cb)); } + template <class Object> static devcb_base &set_clk_cb(device_t &device, Object &&cb) { return downcast<h8_sci_device &>(device).clk_cb.set_callback(std::forward<Object>(cb)); } uint64_t internal_update(uint64_t current_time); @@ -143,6 +145,6 @@ protected: bool has_recv_error() const; }; -extern const device_type H8_SCI; +DECLARE_DEVICE_TYPE(H8_SCI, h8_sci_device) -#endif +#endif // MAME_CPU_H8_H8_SCI_H |