use the short version of the command name for display
[AROS.git] / arch / m68k-amiga / timer / timer_intern.h
blob092e826aecd74f36610abc21ec2fa560146bb88f
1 #ifndef _TIMER_INTERN_H
2 #define _TIMER_INTERN_H
4 /*
5 Copyright © 1995-2018, 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_Elapsed;
42 struct timeval tb_lastsystime;
44 struct MinList tb_Lists[NUM_LISTS];
46 struct Resource *tb_cia[2];
48 struct Resource *tb_eclock_res;
49 volatile struct CIA *tb_eclock_cia;
50 volatile UBYTE *tb_eclock_cr, *tb_eclock_lo, *tb_eclock_hi;
51 struct Interrupt tb_ciaint_eclock;
52 UWORD tb_eclock_intbit;
53 struct EClockVal tb_eclock;
54 ULONG tb_eclock_rate;
55 ULONG tb_eclock_to_usec;
57 struct Resource *tb_micro_res;
58 volatile struct CIA *tb_micro_cia;
59 volatile UBYTE *tb_micro_cr, *tb_micro_lo, *tb_micro_hi;
60 struct Interrupt tb_ciaint_timer;
61 UWORD tb_micro_intbit;
62 ULONG tb_micro_started;
63 struct timeval tb_micro_count;
64 ULONG tb_micro_micros;
65 BOOL tb_micro_on;
67 struct Interrupt tb_vbint;
68 struct timeval tb_vb_count;
69 UWORD tb_vblank_rate;
70 UWORD tb_vblank_micros;
71 BOOL tb_vblank_on;
73 ULONG tb_eclock_micro_mult;
74 UWORD tb_micro_eclock_mult;
75 ULONG lastsystimetweak;
78 ULONG GetEClock(struct TimerBase *TimerBase);
79 void CheckTimer(struct TimerBase *TimerBase, UWORD unitnum);
80 void addmicro(struct TimerBase *TimerBase, struct timeval *tv);
81 BOOL cmp64(struct timeval *tv1, struct timeval *tv2);
82 ULONG sub64(struct timeval *larger, struct timeval *smaller);
83 void add64(struct timeval *dst, struct timeval *src);
84 void inc64(struct timeval *dst);
85 BOOL equ64(struct timeval *tv1, struct timeval *tv2);
86 void convertunits(struct TimerBase *TimerBase, struct timeval *tr, int unit);
88 #endif /* _TIMER_INTERN_H */