34
"C" Programming Guide For Optimus S/R
3.1.6 Program Manager
The Program Manager, being part of the kernel for the Optimus S and Optimus R, is capable
of managing multiple programs.
Flash Memory (Program Manager)
It is possible to download up to 6 programs by calling
LoadProgram()
.
But only one of them can be activated by calling
ActivateProgram()
, and then the
program gets to running upon powering on.
SRAM (File System)
By calling
DownLoadProgram()
, programs can be downloaded to the file system as
well.
The number of programs that can be downloaded depends on the size of SRAM or
memory card, but it cannot exceed 253.
After downloading, the setting of
ProgVersion[]
, if it exists, will be used to be the
default file name. Otherwise, it will be named as “Unknown” automatically. This
file name may be changed by
rename
if necessary.
A program in the file system can be loaded to the Program Manager (flash memory)
by calling
UpdateBank()
. Its file name, as well as the program version, will be copied
to the Program manager accordingly. Then it can be activated by calling
ActivateProgram()
.
Alternatively, a program in the file system can be directly activated by calling
UpdateUser()
. If the file system is not cleared, it allows options for removing the
program from the file system.
ActivateProgram
Purpose
To make a resident program become the active program, and to clear/keep the
original file system.
Syntax
void ActivateProgram (int Prog, int mode);
int Prog; /* 1 ~ 6, represents one of the 6 resident programs */
int mode; /* clear or keep file system */
Example
ActivateProgram (3, KEEP_FILE_SYSTEM);
/* make program #3 become active and keep the file system */
Содержание 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...