Chapter 3 Terminal Specific Function Library
215
3.16 Miscellaneous
DownLoadPage
Purpose
To stop the application and force the program to jump to the System Menu for
downloading new programs.
Syntax
void DownLoadPage (void);
Example
open_com (1, 0x80); /* 38400, N, 8 */
DownLoadPage(); /* enter "Download" mode */
Description
This routine sets the terminal to the "Download mode". The "Download" page
will be displayed, and user can select the COM port and baud rate for program
downloading.
For the Optimus S and Optimus R, it is possible to pass arguments to suppress
the download submenu. For example,
DownLoadPage(NO_MENU, COMM_DIRECT, BAUD_115200);
In this case, the terminal will be set to the "Ready to download" state without
prompting the download submenu.
Parameter #1
The constant NO_MENU is a must.
Parameter #2
Communication type
Parameter #3
Transmission baud rate
For constants of the #2 and #3 parameters, check the header files.
Return
None
prc_menu
Purpose
To create a menu-driven interface.
Syntax
int prc_menu (MENU *menu);
Example
MENU MyMenu = {3, 1, 0, "My Menu", {&Collect, &Upload, &Download}};
MENU_ENTRY Collect = {0, 1, "1. Collect", FuncCollect, 0};
MENU_ENTRY Upload = {0, 2, "2. Upload", FuncUpload, 0};
MENU_ENTRY Download = {0, 3, "3. Download", FuncDownload, 0};
void FuncCollect (void)
{
/* to do: add your own program code here */
Summary of Contents for Optimus R
Page 1: ...Printed on 20 March 2006 C Programming Guide Version 3 04 02 Optimus S Optimus R...
Page 6: ......
Page 8: ...2 C Programming Guide For Optimus S R...
Page 12: ...6 C Programming Guide For Optimus S R The flow is illustrated as shown below...
Page 23: ...Chapter 2 Development Environment 17 Different types signed unsigned Different types same size...
Page 24: ...18 C Programming Guide For Optimus S R...
Page 220: ...214 C Programming Guide For Optimus S R See Also FlashSize free_memory...