#include “7188xb.h”
void main()
{
int quit=0,data;
InitLib();
InstallCom1(115200,8,0,1); /*install the driver for COM1*/
while(!quit) {
if(IsCom1()) { /*checks if any data is in the COM1 buffer*/
data=ReadCom1(); /*reads data from COM1*/
ToCom1(data); /*sends data to COM1*/
if(data==’q’) quit=1; /*if ‘q’ is received, exit the program*/
}
}
RestoreCom1(); /*uninstalls the driver for COM1*/
}
RestoreCom()
Function: Uninstalls the driver for the COM Port. The COM Port
number is not assigned.
Syntax:
int RestoreCom(int port);
Header: #include
”7188xb.h”
Description: Uninstalls the driver for the COM Port. The COM Port
number is not assigned and can be modified using the
“port” parameter.
port: assigns the COM Port number
Example: Please refer to “InstallCom()” for an example.
RestoreCom1()
Function: Uninstall the driver for COM1.
Syntax:
int RestoreCom1(void);
Header: #include
”7188xb.h”
Description: Uninstall the driver for COM1 and is assigned to COM1
Example: Please refer to “InstallCom1()” for an example.
IsCom()
Function: Checks
whether there is any data stored in the COM Port
buffer. The COM Port number is not assigned.
Syntax:
int IsCom(int port);
Header: #include
”7188xb.h”
I-7188XB Series User’s Manual(Ver.1.0, Apr/2007,
7MH-020-10
) ---
105
Содержание I-7188XB Series
Страница 88: ...I 7188XB Series User s Manual Ver 1 0 Apr 2007 7MH 020 10 88...
Страница 138: ...I 7188XB Series User s Manual Ver 1 0 Apr 2007 7MH 020 10 138...
Страница 144: ...Step 8 Make the project I 7188XB Series User s Manual Ver 1 0 Apr 2007 7MH 020 10 144...
Страница 151: ...Step 8 Rebuild the project I 7188XB Series User s Manual Ver 1 0 Apr 2007 7MH 020 10 151...