Fixed binary search: no more infinite loops when vendor is unknown.
[tangerine.git] / rom / timer / timer_intern.h
blob32103c5bd8f32c3a072afecfae9d95a8bdb3dd77
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
30 #ifndef HIDD_TIMER_H
31 #include <hidd/timer.h>
32 #endif
33 #ifndef DOS_BPTR_H
34 #include <dos/bptr.h>
35 #endif
37 #include <aros/system.h>
38 #include <aros/libcall.h>
39 #include <aros/asmcall.h>
41 #define TL_VBLANK 0
42 #define TL_WAITVBL 1
43 #define TL_MICROHZ 2
44 #define TL_ECLOCK 3
45 #define TL_WAITECLOCK 4
46 #define NUM_LISTS 5
48 struct TimerBase
50 /* Required by the system */
51 struct Device tb_Device;
53 struct IClass *tb_TimerHIDD;
54 ULONG tb_MiscFlags; /* miscellaneous flags */
55 struct timeval tb_CurrentTime; /* system time */
56 struct timeval tb_Elapsed; /* Elapsed Time for VBlank */
58 /* This is required for the vertical blanking stuff */
59 struct Interrupt tb_VBlankInt;
60 struct IClass *tb_VBlankHIDD; /* vblank hidd class */
61 struct timeval tb_VBlankTime; /* vblank interval */
63 /* Lists for waiting vblank, waituntil, microhz, eclock, waiteclock */
64 struct MinList tb_Lists[NUM_LISTS];
66 UQUAD tb_ticks_total;
67 ULONG tb_ticks_sec;
68 ULONG tb_ticks_elapsed;
69 ULONG tb_prev_tick;
71 struct timerequest tb_vblank_timerequest; /* For vblank emulation */
74 #define GetTimerBase(tb) ((struct TimerBase *)(tb))
75 #define GetDevice(tb) ((struct Device *)(tb))
77 #define TF_GO (1L<<0)
78 #define TF_GotVBlank (1L<<1) /* HIDD used for VBlank units */
79 #define TF_GotEClock (1L<<2) /* HIDD used for other units */
81 #endif /* _TIMER_INTERN_H */