diff options
author | 2011-02-03 09:06:34 +0000 | |
---|---|---|
committer | 2011-02-03 09:06:34 +0000 | |
commit | f534d245c02059be44071e9c37f38497f12f67f8 (patch) | |
tree | b7b724026e8005bed1a42de7b3b6ea72178e4554 /src/emu/machine/rtc65271.c | |
parent | 1e88333178b63ee0d5b914e181b19b3b161f807b (diff) |
Attotime bulk conversion step:
attotime_zero => attotime::zero
attotime_never => attotime::never
ATTOTIME_IN_SEC(s) => attotime::from_seconds(s)
ATTOTIME_IN_MSEC(m) => attotime::from_msec(m)
ATTOTIME_IN_USEC(u) => attotime::from_usec(u)
ATTOTIME_IN_NSEC(n) => attotime::from_nsec(n)
ATTOTIME_IN_HZ(h) => attotime::from_hz(h)
Also, changed the following MCFG macros to require a full
attotime specification:
MCFG_TIMER_ADD_PERIODIC
MCFG_QUANTUM_TIME
MCFG_WATCHDOG_TIME_INIT
Diffstat (limited to 'src/emu/machine/rtc65271.c')
-rw-r--r-- | src/emu/machine/rtc65271.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/emu/machine/rtc65271.c b/src/emu/machine/rtc65271.c index 642efa3d117..91016b64152 100644 --- a/src/emu/machine/rtc65271.c +++ b/src/emu/machine/rtc65271.c @@ -25,10 +25,10 @@ static TIMER_CALLBACK( rtc_end_update_callback ); /* Delay between the beginning (UIP asserted) and the end (UIP cleared and update interrupt asserted) of the update cycle */ -#define UPDATE_CYCLE_TIME ATTOTIME_IN_USEC(1984) +#define UPDATE_CYCLE_TIME attotime::from_usec(1984) /* Delay between the assertion of UIP and the effective start of the update cycle */ -/*#define UPDATE_CYCLE_DELAY ATTOTIME_IN_USEC(244)*/ +/*#define UPDATE_CYCLE_DELAY attotime::from_usec(244)*/ typedef struct _rtc65271_state rtc65271_state; struct _rtc65271_state @@ -408,7 +408,7 @@ void rtc65271_w(device_t *device, int xramsel, offs_t offset, UINT8 data) { if (data & reg_A_RS) { - attotime period = ATTOTIME_IN_HZ(SQW_freq_table[data & reg_A_RS]); + attotime period = attotime::from_hz(SQW_freq_table[data & reg_A_RS]); attotime half_period = period / 2; attotime elapsed = timer_timeelapsed(state->update_timer); @@ -422,7 +422,7 @@ void rtc65271_w(device_t *device, int xramsel, offs_t offset, UINT8 data) state->SQW_internal_state = 0; /* right??? */ /* Stop the divider used for SQW and periodic interrupts. */ - timer_adjust_oneshot(state->SQW_timer, attotime_never, 0); + timer_adjust_oneshot(state->SQW_timer, attotime::never, 0); } } /* The UIP bit is read-only */ @@ -689,7 +689,7 @@ static DEVICE_START( rtc65271 ) rtc65271_state *state = get_safe_token(device); state->update_timer = timer_alloc(device->machine, rtc_begin_update_callback, (void *)device); - timer_adjust_periodic(state->update_timer, ATTOTIME_IN_SEC(1), 0, ATTOTIME_IN_SEC(1)); + timer_adjust_periodic(state->update_timer, attotime::from_seconds(1), 0, attotime::from_seconds(1)); state->SQW_timer = timer_alloc(device->machine, rtc_SQW_callback, (void *)device); state->interrupt_callback = config->interrupt_callback; |