summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/rtc9701.cpp
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-03-07 14:45:58 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2016-03-07 14:45:58 +0100
commit8ea9ff6a7afdcc5ca5e48351feee06e43d7fc4ee (patch)
treed3dfa7422f877f4902ed4e3b3f94a5d15cc41c58 /src/devices/machine/rtc9701.cpp
parentfea09343fb83663225a5099f2fb857e264588be9 (diff)
TIMER_CALLBACK to TIMER_CALLBACK_MEMBER (nw)
Diffstat (limited to 'src/devices/machine/rtc9701.cpp')
-rw-r--r--src/devices/machine/rtc9701.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/devices/machine/rtc9701.cpp b/src/devices/machine/rtc9701.cpp
index 7c92ddc53e7..fc72c76c900 100644
--- a/src/devices/machine/rtc9701.cpp
+++ b/src/devices/machine/rtc9701.cpp
@@ -41,7 +41,7 @@ rtc9701_device::rtc9701_device(const machine_config &mconfig, const char *tag, d
{
}
-void rtc9701_device::timer_callback()
+TIMER_CALLBACK_MEMBER(rtc9701_device::timer_callback)
{
static const UINT8 dpm[12] = { 0x31, 0x28, 0x31, 0x30, 0x31, 0x30, 0x31, 0x31, 0x30, 0x31, 0x30, 0x31 };
int dpm_count;
@@ -72,11 +72,6 @@ void rtc9701_device::timer_callback()
if((m_rtc.year & 0xf0) >= 0xa0) { m_rtc.year = 0; } //2000-2099 possible timeframe
}
-TIMER_CALLBACK( rtc9701_device::rtc_inc_callback )
-{
- reinterpret_cast<rtc9701_device *>(ptr)->timer_callback();
-}
-
//-------------------------------------------------
// device_validity_check - perform validity checks
// on this device
@@ -93,7 +88,7 @@ void rtc9701_device::device_validity_check(validity_checker &valid) const
void rtc9701_device::device_start()
{
/* let's call the timer callback every second */
- machine().scheduler().timer_pulse(attotime::from_hz(clock() / XTAL_32_768kHz), FUNC(rtc_inc_callback), 0, (void *)this);
+ machine().scheduler().timer_pulse(attotime::from_hz(clock() / XTAL_32_768kHz), timer_expired_delegate(FUNC(rtc9701_device::timer_callback), this));
system_time systime;
machine().base_datetime(systime);