diff options
Diffstat (limited to 'src/devices/machine/mccs1850.cpp')
-rw-r--r-- | src/devices/machine/mccs1850.cpp | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/devices/machine/mccs1850.cpp b/src/devices/machine/mccs1850.cpp index abbddf5b9be..367b58af135 100644 --- a/src/devices/machine/mccs1850.cpp +++ b/src/devices/machine/mccs1850.cpp @@ -105,7 +105,7 @@ DEFINE_DEVICE_TYPE(MCCS1850, mccs1850_device, "mccs1850", "MCCS1850 RTC") //************************************************************************** -// INLINE HELPERS +// DEVICE FUNCTIONS //************************************************************************** //------------------------------------------------- @@ -247,7 +247,7 @@ inline void mccs1850_device::write_register(offs_t offset, uint8_t data) // advance_seconds - //------------------------------------------------- -inline void mccs1850_device::advance_seconds() +TIMER_CALLBACK_MEMBER(mccs1850_device::advance_seconds) { uint32_t alarm = (m_ram[REGISTER_ALARM_LATCH] << 24) | (m_ram[REGISTER_ALARM_LATCH + 1] << 16) | (m_ram[REGISTER_ALARM_LATCH + 2] << 8) | m_ram[REGISTER_ALARM_LATCH + 3]; @@ -324,7 +324,7 @@ void mccs1850_device::device_start() nuc_cb.resolve(); // allocate timers - m_clock_timer = timer_alloc(TIMER_CLOCK); + m_clock_timer = timer_alloc(FUNC(mccs1850_device::advance_seconds), this); m_clock_timer->adjust(attotime::from_hz(clock() / 32768), 0, attotime::from_hz(clock() / 32768)); // state saving @@ -356,21 +356,6 @@ void mccs1850_device::device_reset() //------------------------------------------------- -// device_timer - handler timer events -//------------------------------------------------- - -void mccs1850_device::device_timer(emu_timer &timer, device_timer_id id, int param) -{ - switch (id) - { - case TIMER_CLOCK: - advance_seconds(); - break; - } -} - - -//------------------------------------------------- // nvram_default - called to initialize NVRAM to // its default state //------------------------------------------------- |