2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
5 Desc: ReadEClock() - read the base frequency of timers.
9 #include <devices/timer.h>
10 #include <proto/timer.h>
11 #include <proto/exec.h>
13 #include <timer_intern.h>
15 /* See rom/timer/readeclock.c for documentation */
17 AROS_LH1(ULONG
, ReadEClock
,
18 AROS_LHA(struct EClockVal
*, dest
, A0
),
19 struct TimerBase
*, TimerBase
, 10, Timer
)
26 old
= dest
->ev_lo
= TimerBase
->tb_eclock
.ev_lo
;
27 dest
->ev_hi
= TimerBase
->tb_eclock
.ev_hi
;
28 eclock
= GetEClock(TimerBase
);
30 dest
->ev_lo
+= eclock
;
31 if (old
> dest
->ev_lo
)
33 return TimerBase
->tb_eclock_rate
;