
Chapter 3 Terminal Specific Function Library
35
Description
This routine copies the desired program (
Prog
) in flash memory from its
residence location to the active area, and thus makes it become the active
program. The original file system may be kept or cleared (
mode
).
KEEP_FILE_SYSTEM
0
CLEAR_FILE_SYSTEM 1
The original program resided in the active area will then be replaced by the
new program.
The POWER key is disabled to protect the system while replacing the
program.
This routine will not return, however, once the execution continues
running to the next instruction, it means the operation of this routine fails.
If successful, the new program will be activated immediately.
Return
None
See Also
LoadProgram, ProgramInfo, ProgramManager
DownLoadProgram
Purpose
To download a user program (.SHX) to SRAM.
Syntax
int DownLoadProgram (char *filename, int comport, int baudrate);
char *filename;
/* pointer to a buffer where filename of the program is stored */
int comport; /* COM1 or COM2 for transmission */
int baudrate; /* appropriate baud rate */
Example
val = DownLoadProgram (filename_buffer, 1, BAUD_115200);
/* download user program via COM1 at 115200 bps and return file name to
filename_buffer */
Description
This routine is used to download a user program to the file system (SRAM).
A file name can be 8 bytes at most, the null character not included.
If its file name is identical to an existing program, the execution will fail.
For the Optimus R, it is necessary to set the communication type of the
specified port before calling this routine, i.e. SetCommType(1, 0) for
Direct RS-232 or SetCommType(1, 2) for Cradle-IR. Download via IrDA
is allowed for LoadProgram() only, not for this routine.
Return
If successful, it returns 1.
On error, it returns 0.
Otherwise, it returns -1 to indicate the action is aborted.
See Also
UpdateBank, UpdateUser
Содержание 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...