Texas Instruments TI89 Developer Guide - Page 671
Declaration, Categoryies, Description, Inputs, Outputs, Assumptions, Side Effects, Availability, TI-89 / TI-92 Plus, Differences, See Also, Example
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 671 highlights
Appendix A: System Routines - Interrupts 629 idle Declaration: void idle (void) Category(ies): Interrupts Description: Sets the calculator in low power mode until an interrupt (usually a timer, keypress, or link activity) occurs. Leaves the LCD powered and the screen visible. Inputs: None Outputs: None Assumptions: None Side Effects: None Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: off Example: /* Try to get the USER timer, if already in use, return FALSE. Else, wait up to a minute for a key. If a key is pressed within a minute, return TRUE. If no key is pressed within a minute return FALSE This code is intended to illustrate the usage of timer routines: off, idle, kbhit, ngetchx, and pushkey. */ #include "tiams.h" enum {EX_CONTINUE = 0, /* ERROR */ EX_BREAK, /* break key */ EX_TIMEOUT, /* timer expired before key hit */ EX_KEY, /* key hit before timer expired */ EX_2ND_OFF, /* turn calc off and return when turned back on */ EX_OPT_OFF /* turn calc off and continue when turned back on */ } i; WORD waitOneMinForKey( void ) { Access_AMS_Global_Variables; i = EX_CONTINUE; if( !OSRegisterTimer( USER, ONE_MINUTE )) return FALSE; /* USER TIMER already in use */ while ( TRUE ) { (continued) TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001