Removed autodocs of arch specific variants of ROM modules.
[AROS.git] / arch / m68k-amiga / timer / timer_intern.h
blobb5f29a291ec8340e4c4fdaf05c4b2942dd4573fe
1 #ifndef _TIMER_INTERN_H
2 #define _TIMER_INTERN_H
4 /*
5 Copyright © 1995-2008, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Internal information about the timer.device and HIDD's
9 Lang: english
12 #ifndef EXEC_TYPES_H
13 #include <exec/types.h>
14 #endif
15 #ifndef EXEC_LISTS_H
16 #include <exec/lists.h>
17 #endif
18 #ifndef EXEC_INTERRUPTS_H
19 #include <exec/interrupts.h>
20 #endif
21 #ifndef EXEC_IO_H
22 #include <exec/io.h>
23 #endif
24 #ifndef EXEC_DEVICES_H
25 #include <exec/devices.h>
26 #endif
27 #ifndef DEVICES_TIMER_H
28 #include <devices/timer.h>
29 #endif
31 #define NUM_LISTS 2
33 #define ECLOCK_BASE 0x10000
35 struct TimerBase
37 /* Required by the system */
38 struct Device tb_Device;
40 struct timeval tb_CurrentTime; /* system time */
41 struct timeval tb_lastsystime;
43 struct MinList tb_Lists[NUM_LISTS];
45 struct Resource *tb_cia[2];
47 struct Resource *tb_eclock_res;
48 volatile struct CIA *tb_eclock_cia;
49 volatile UBYTE *tb_eclock_cr, *tb_eclock_lo, *tb_eclock_hi;
50 struct Interrupt tb_ciaint_eclock;
51 UWORD tb_eclock_intbit;
52 struct EClockVal tb_eclock;
53 ULONG tb_eclock_rate;
54 ULONG tb_eclock_to_usec;
56 struct Resource *tb_micro_res;
57 volatile struct CIA *tb_micro_cia;
58 volatile UBYTE *tb_micro_cr, *tb_micro_lo, *tb_micro_hi;
59 struct Interrupt tb_ciaint_timer;
60 UWORD tb_micro_intbit;
61 ULONG tb_micro_started;
62 struct timeval tb_micro_count;
63 ULONG tb_micro_micros;
64 BOOL tb_micro_on;
66 struct Interrupt tb_vbint;
67 struct timeval tb_vb_count;
68 UWORD tb_vblank_rate;
69 UWORD tb_vblank_micros;
70 BOOL tb_vblank_on;
72 ULONG tb_eclock_micro_mult;
73 UWORD tb_micro_eclock_mult;
74 ULONG lastsystimetweak;
77 ULONG GetEClock(struct TimerBase *TimerBase);
78 void CheckTimer(struct TimerBase *TimerBase, UWORD unitnum);
79 void addmicro(struct TimerBase *TimerBase, struct timeval *tv);
80 BOOL cmp64(struct timeval *tv1, struct timeval *tv2);
81 ULONG sub64(struct timeval *larger, struct timeval *smaller);
82 void add64(struct timeval *dst, struct timeval *src);
83 void inc64(struct timeval *dst);
84 BOOL equ64(struct timeval *tv1, struct timeval *tv2);
85 void convertunits(struct TimerBase *TimerBase, struct timeval *tr, int unit);
87 #endif /* _TIMER_INTERN_H */