Initial revision
[ssr] / StraySrc / Libraries / Sapphire / csapph / h / idle
1 /*
2 * idle.h
3 *
4 * [Generated from idle, 25 September 1996]
5 */
6
7 #if !defined(__CC_NORCROFT) || !defined(__arm)
8 #error You must use the Norcroft ARM Compiler for Sapphire programs
9 #endif
10
11 #pragma include_only_once
12 #pragma force_top_level
13
14 #ifndef __idle_h
15 #define __idle_h
16
17 #ifndef __sapphire_h
18 #include "sapphire.h"
19 #endif
20
21 /*----- Overview ----------------------------------------------------------*
22 *
23 * Functions provided:
24 *
25 * idle_handler
26 * idle_removeHandler
27 * idle_setAlarm
28 * idle_removeAlarm
29 * idle_removeAllAlarms
30 * idle_init
31 */
32
33 /* --- idle_handler --- *
34 *
35 * On entry: R0 == how frequently to call
36 * R1 == pointer to routine to call
37 * R2 == R10 value to call routine with
38 * R3 == R12 value to call routine with
39 *
40 * On exit: May return an error
41 *
42 * Use: Adds a routine to the idle handler list. Later added
43 * routines are called first. The idle handing routine
44 * may corrupt R10 and R12.
45 */
46
47 extern routine idle_handler;
48
49 /* --- idle_removeHandler --- *
50 *
51 * On entry: R0 == How frequently it was called
52 * R1 == pointer to routine called
53 * R2 == R10 value routine is called with
54 * R3 == R12 value routine is called with
55 *
56 * On exit: --
57 *
58 * Use: Removes a routine from the idle handler list.
59 */
60
61 extern routine idle_removeHandler;
62
63 /* --- idle_setAlarm --- *
64 *
65 * On entry: R3 == Time to call
66 * R1 == pointer to routine to call
67 * R2 == R10 value to call routine with
68 * R3 == R12 value to call routine with
69 *
70 * On exit: May return an error
71 *
72 * Use: Adds a alarm to be called. The idle handing routine
73 * may corrupt R10 and R12.
74 */
75
76 extern routine idle_setAlarm;
77
78 /* --- idle_removeAlarm --- *
79 *
80 * On entry: R0 == When it was to be called
81 * R1 == pointer to routine called
82 * R2 == R10 value routine is called with
83 * R3 == R12 value routine is called with
84 *
85 * On exit: --
86 *
87 * Use: Removes a routine from the idle handler list. It has
88 * no effect if it doesn't exist.
89 */
90
91 extern routine idle_removeAlarm;
92
93 /* --- idle_removeAllAlarms --- *
94 *
95 * On entry: R0 == R10 value to look for
96 *
97 * On exit: --
98 *
99 * Use: Removes all alarms with the handle that was passed to them
100 * to be put into R10. You should not remove an alarm within
101 * an alarm handler.
102 */
103
104 extern routine idle_removeAllAlarms;
105
106 /* --- idle_init --- *
107 *
108 * On entry: --
109 *
110 * On exit: --
111 *
112 * Use: Initialises the idle system.
113 */
114
115 extern routine idle_init;
116
117 /*----- That's all, folks -------------------------------------------------*/
118
119 #endif