I-7188XA Series User’s Manual ( Ver1.2, Feb/2014, 7MH-019-10 ) ---
107
InstallCom1()
Function: Installs the driver for COM1.
Syntax:
int InstallCom1(unsigned long baud, int data, int
parity, int stop);
Header:
#include ”7188xa.h”
Description: Installs the driver for COM1, and is assigned to COM1
baud: Baud Rate, the default Baud Rate for the
I-7188XA(D) is 115200
Example:
#include <7188xa.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 ”7188xa.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);
Summary of Contents for I-7188XA
Page 62: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 62 5 6 COM1 RS 232 1 2 232...
Page 90: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 90 1 2...
Page 140: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 140...
Page 146: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 146 Step 8 Make the project...
Page 153: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 153 Step 8 Rebuild the project...
Page 158: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 158...
Page 162: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 162...
Page 164: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 164...