24
"C" Programming Guide For Optimus S/R
3.1.3 System Global Variables
There are several global variables that are declared by the system.
Two of them are system timers that are cleared to 0 upon powering up.
extern volatile unsigned long
sys_msec; /* in units of 5 ms */
extern volatile unsigned long
sys_sec; /* in units of 1 second */
Note: Do not write to these system timers as they are updated by the timer interrupt.
Other system variables are as follows.
extern unsigned int
AUTO_OFF; /* in units of 1 second */
This variable governs the timer for the system to automatically shut down the user’s
program whenever there is no operation during the preset period.
When it is set to 0, the AUTO_OFF function will be disabled.
extern unsigned int
POWER_ON;
This variable can be set to either POWERON_RESUME or POWERON_RESTART.
By default, it is set to POWERON_RESUME, i.e., upon powering on, the user program
will start from the last powering off session.
However, in some cases the user program will always restart itself upon powering on:
when batteries being removed and loaded back;
when entering the System Menu before normal operation.
extern unsigned int
BKLIT_TIMEOUT; /* in units of 1 second */
This variable holds the backlight timer for the LCD when its backlight is set on. By
default, it is set to 20 seconds.
Содержание Optimus R
Страница 1: ...Printed on 20 March 2006 C Programming Guide Version 3 04 02 Optimus S Optimus R...
Страница 6: ......
Страница 8: ...2 C Programming Guide For Optimus S R...
Страница 12: ...6 C Programming Guide For Optimus S R The flow is illustrated as shown below...
Страница 23: ...Chapter 2 Development Environment 17 Different types signed unsigned Different types same size...
Страница 24: ...18 C Programming Guide For Optimus S R...
Страница 220: ...214 C Programming Guide For Optimus S R See Also FlashSize free_memory...
Страница 232: ...226 C Programming Guide For Optimus S R 4 11 Implementation defined Limits limits h float h Refer to limit h and float h...
Страница 238: ...232 C Programming Guide For Optimus S R...