| 1 | /* |
| 2 | * hour.h |
| 3 | * |
| 4 | * [Generated from hour, 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 __hour_h |
| 15 | #define __hour_h |
| 16 | |
| 17 | #ifndef __sapphire_h |
| 18 | #include "sapphire.h" |
| 19 | #endif |
| 20 | |
| 21 | /*----- Overview ----------------------------------------------------------* |
| 22 | * |
| 23 | * Functions provided: |
| 24 | * |
| 25 | * hour_init |
| 26 | * hour_on |
| 27 | * hour_off |
| 28 | * hour_percent |
| 29 | * hour_leds |
| 30 | * hour_suspend |
| 31 | * hour_save |
| 32 | * hour_resume |
| 33 | * hour_restore |
| 34 | */ |
| 35 | |
| 36 | /* --- hour_init --- * |
| 37 | * |
| 38 | * On entry: -- |
| 39 | * |
| 40 | * On exit: -- |
| 41 | * |
| 42 | * Use: Initialises the hour system, so it will display an hourglass |
| 43 | * when necessary. |
| 44 | * |
| 45 | * Since this gets called at a random point during the Sapphire |
| 46 | * initialisation, and we can rely on Hourglass keeping its |
| 47 | * own count, the suggested way of handling everything properly |
| 48 | * is as follows: |
| 49 | * |
| 50 | * SWI Hourglass_On |
| 51 | * BL sapphire_init |
| 52 | * SWI Hourglass_Off |
| 53 | */ |
| 54 | |
| 55 | extern routine hour_init; |
| 56 | |
| 57 | /* --- hour_on --- * |
| 58 | * |
| 59 | * On entry: -- |
| 60 | * |
| 61 | * On exit: -- |
| 62 | * |
| 63 | * Use: Turns the Hourglass on only if it isn't on already. |
| 64 | * Otherwise its status is left as it was. |
| 65 | */ |
| 66 | |
| 67 | extern routine hour_on; |
| 68 | |
| 69 | /* --- hour_off --- * |
| 70 | * |
| 71 | * On entry: -- |
| 72 | * |
| 73 | * On exit: -- |
| 74 | * |
| 75 | * Use: Turns the Hourglass off if it's only been turned on once. |
| 76 | * If the Hourglass gets turned off, all the information about |
| 77 | * it (percentage and LEDs) get forgotten. |
| 78 | */ |
| 79 | |
| 80 | extern routine hour_off; |
| 81 | |
| 82 | /* --- hour_percent --- * |
| 83 | * |
| 84 | * On entry: R0 == percentage value to display, or -1 to remove |
| 85 | * |
| 86 | * On exit: -- |
| 87 | * |
| 88 | * Use: Attaches a percentage display to the Hourglass. |
| 89 | */ |
| 90 | |
| 91 | extern routine hour_percent; |
| 92 | |
| 93 | /* --- hour_leds --- * |
| 94 | * |
| 95 | * On entry: R0 == LED mask EOR value |
| 96 | * R1 == LED mask AND value |
| 97 | * |
| 98 | * On exit: -- |
| 99 | * |
| 100 | * Use: Changes the Hourglass LED status. |
| 101 | */ |
| 102 | |
| 103 | extern routine hour_leds; |
| 104 | |
| 105 | /* --- hour_suspend --- * |
| 106 | * |
| 107 | * On entry: R0 == pointer to 2 word block to save status in |
| 108 | * |
| 109 | * On exit: -- |
| 110 | * |
| 111 | * Use: Saves the Hourglass state in a block you've pointed at, |
| 112 | * and disables the Hourglass. Useful if you want to do some |
| 113 | * user interaction without polling (e.g. an error box). |
| 114 | */ |
| 115 | |
| 116 | extern routine hour_suspend; |
| 117 | |
| 118 | /* --- hour_save --- * |
| 119 | * |
| 120 | * On entry: R0 == pointer to 2 word block to save status in |
| 121 | * |
| 122 | * On exit: -- |
| 123 | * |
| 124 | * Use: Saves the current Hourglass status without altering it. |
| 125 | */ |
| 126 | |
| 127 | extern routine hour_save; |
| 128 | |
| 129 | /* --- hour_resume, hour_restore --- * |
| 130 | * |
| 131 | * On entry: R0 == pointer to 2 words filled by hour_suspend or hour_save |
| 132 | * |
| 133 | * On exit: -- |
| 134 | * |
| 135 | * Use: Restores the Hourglass state to that saved away by one |
| 136 | * of the previous two calls. This routine has two names. |
| 137 | */ |
| 138 | |
| 139 | extern routine hour_resume; |
| 140 | |
| 141 | /* --- hour_resume, hour_restore --- * |
| 142 | * |
| 143 | * On entry: R0 == pointer to 2 words filled by hour_suspend or hour_save |
| 144 | * |
| 145 | * On exit: -- |
| 146 | * |
| 147 | * Use: Restores the Hourglass state to that saved away by one |
| 148 | * of the previous two calls. This routine has two names. |
| 149 | */ |
| 150 | |
| 151 | extern routine hour_resume; |
| 152 | extern routine hour_restore; |
| 153 | |
| 154 | /*----- That's all, folks -------------------------------------------------*/ |
| 155 | |
| 156 | #endif |