added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / rom / timer / timer_intern.h
blob51e5dcca6ff1f0a419df4cbc23e501da9dcd063d
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Internal information about the timer.device and HIDD's
6 Lang: english
7 */
9 #ifndef EXEC_TYPES_H
10 #include <exec/types.h>
11 #endif
12 #ifndef EXEC_LISTS_H
13 #include <exec/lists.h>
14 #endif
15 #ifndef EXEC_INTERRUPTS_H
16 #include <exec/interrupts.h>
17 #endif
18 #ifndef EXEC_IO_H
19 #include <exec/io.h>
20 #endif
21 #ifndef EXEC_DEVICES_H
22 #include <exec/devices.h>
23 #endif
24 #ifndef DEVICES_TIMER_H
25 #include <devices/timer.h>
26 #endif
27 #ifndef HIDD_TIMER_H
28 #include <hidd/timer.h>
29 #endif
30 #ifndef DOS_BPTR_H
31 #include <dos/bptr.h>
32 #endif
34 #include <aros/system.h>
35 #include <aros/libcall.h>
36 #include <aros/asmcall.h>
38 #define TL_VBLANK 0
39 #define TL_WAITVBL 1
40 #define TL_MICROHZ 2
41 #define TL_ECLOCK 3
42 #define TL_WAITECLOCK 4
43 #define NUM_LISTS 5
45 struct TimerBase
47 /* Required by the system */
48 struct Device tb_Device;
50 struct IClass *tb_TimerHIDD;
51 ULONG tb_MiscFlags; /* miscellaneous flags */
52 struct timeval tb_CurrentTime; /* system time */
53 struct timeval tb_Elapsed; /* Elapsed Time for VBlank */
55 /* This is required for the vertical blanking stuff */
56 struct Interrupt tb_VBlankInt;
57 struct IClass *tb_VBlankHIDD; /* vblank hidd class */
58 struct timeval tb_VBlankTime; /* vblank interval */
60 /* Lists for waiting vblank, waituntil, microhz, eclock, waiteclock */
61 struct MinList tb_Lists[NUM_LISTS];
63 UQUAD tb_ticks_total;
64 ULONG tb_ticks_sec;
65 ULONG tb_ticks_elapsed;
66 ULONG tb_prev_tick;
68 struct timerequest tb_vblank_timerequest; /* For vblank emulation */
71 #define GetTimerBase(tb) ((struct TimerBase *)(tb))
72 #define GetDevice(tb) ((struct Device *)(tb))
74 #define TF_GO (1L<<0)
75 #define TF_GotVBlank (1L<<1) /* HIDD used for VBlank units */
76 #define TF_GotEClock (1L<<2) /* HIDD used for other units */