diff options
| author | 2016-03-07 14:45:58 +0100 | |
|---|---|---|
| committer | 2016-03-07 14:45:58 +0100 | |
| commit | 8ea9ff6a7afdcc5ca5e48351feee06e43d7fc4ee (patch) | |
| tree | d3dfa7422f877f4902ed4e3b3f94a5d15cc41c58 /src/devices/machine/rtc65271.cpp | |
| parent | fea09343fb83663225a5099f2fb857e264588be9 (diff) | |
TIMER_CALLBACK to TIMER_CALLBACK_MEMBER (nw)
Diffstat (limited to 'src/devices/machine/rtc65271.cpp')
| -rw-r--r-- | src/devices/machine/rtc65271.cpp | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/src/devices/machine/rtc65271.cpp b/src/devices/machine/rtc65271.cpp index 074b8d87f48..0c02e4fb176 100644 --- a/src/devices/machine/rtc65271.cpp +++ b/src/devices/machine/rtc65271.cpp @@ -464,30 +464,10 @@ void rtc65271_device::field_interrupts() /* - Timer handlers -*/ -TIMER_CALLBACK( rtc65271_device::rtc_SQW_callback ) -{ - rtc65271_device *rtc = reinterpret_cast<rtc65271_device *>(ptr); - rtc->rtc_SQW_cb(); -} - -TIMER_CALLBACK( rtc65271_device::rtc_begin_update_callback ) -{ - rtc65271_device *rtc = reinterpret_cast<rtc65271_device *>(ptr); - rtc->rtc_begin_update_cb(); -} - -TIMER_CALLBACK( rtc65271_device::rtc_end_update_callback ) -{ - rtc65271_device *rtc = reinterpret_cast<rtc65271_device *>(ptr); - rtc->rtc_end_update_cb(); -} -/* Update SQW output state each half-period and assert periodic interrupt each period. */ -void rtc65271_device::rtc_SQW_cb() +TIMER_CALLBACK_MEMBER(rtc65271_device::rtc_SQW_cb) { attotime half_period; @@ -506,14 +486,14 @@ void rtc65271_device::rtc_SQW_cb() /* Begin update cycle (called every second) */ -void rtc65271_device::rtc_begin_update_cb() +TIMER_CALLBACK_MEMBER(rtc65271_device::rtc_begin_update_cb) { if (((m_regs[reg_A] & reg_A_DV) == 0x20) && ! (m_regs[reg_B] & reg_B_SET)) { m_regs[reg_A] |= reg_A_UIP; /* schedule end of update cycle */ - machine().scheduler().timer_set(UPDATE_CYCLE_TIME, FUNC(rtc_end_update_callback), 0, (void *)this); + machine().scheduler().timer_set(UPDATE_CYCLE_TIME, timer_expired_delegate(FUNC(rtc65271_device::rtc_end_update_cb), this)); } } @@ -521,7 +501,7 @@ void rtc65271_device::rtc_begin_update_cb() End update cycle (called UPDATE_CYCLE_TIME = 1948us after start of update cycle) */ -void rtc65271_device::rtc_end_update_cb() +TIMER_CALLBACK_MEMBER(rtc65271_device::rtc_end_update_cb) { static const int days_in_month_table[12] = { @@ -684,9 +664,9 @@ rtc65271_device::rtc65271_device(const machine_config &mconfig, const char *tag, //------------------------------------------------- void rtc65271_device::device_start() { - m_update_timer = machine().scheduler().timer_alloc(FUNC(rtc_begin_update_callback), (void *)this); + m_update_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(rtc65271_device::rtc_begin_update_cb), this)); m_update_timer->adjust(attotime::from_seconds(1), 0, attotime::from_seconds(1)); - m_SQW_timer = machine().scheduler().timer_alloc(FUNC(rtc_SQW_callback), (void *)this); + m_SQW_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(rtc65271_device::rtc_SQW_cb), this)); m_interrupt_cb.resolve(); save_item(NAME(m_regs)); |
