C Language Development Kit/Functions/DownloadApplication
From OptiWiki
< C Language Development Kit | Functions(Redirected from C Language Development Kit/Functions/Downloadapplication)
| Description | This function switches the terminal into a mode in which the user can install
a new application. An application loader on the PC, such as APPLOAD.EXE, can then be used to install a new application. | ||||||
| Syntax | void downloadapplication(int port); | ||||||
| Arguments | port specifies which serial communications port is going to be used. See the table below for details:
int port
| ||||||
| Returns | None | ||||||
| Remarks | WARNING!
The current application in the handheld terminal is erased, before downloading starts. If the download process is interrupted accidentally, the handheld terminal is left in the system menu, without an application in memory. The function runapplfromfile() is a better option. It loads an application from a file that is residing on the handheld terminal. This function closes any open communication port. | ||||||
| Example | #include "lib.h" #include <stdio.h> void main( void ) { printf("\fFor download\npress ENT key."); delay( 100 ); resetkey(); for(;;) { while( getchar() != ENT_KEY ) idle(); downloadapplication( COM1 ); // use IrDA / Cradle printf("\fDownload didn't\nsucceed !"); delay( 100 ); printf("\fTry again!\nPress ENT key."); delay( 100 ); resetkey(); } } |
