27
PCI-1680U/1682U User Manual
Chapter 4
S
oftware
R
equirements
4.3
Introduction to API
Main API used in current development are:
Only brief introduction is given in this manual regarding detailed usage of each func-
tion.Notes are made to notify users of important operation.For more detailed informa-
tion about the usage, please see MSDN.
4.3.1
CreateFile
Users can use this interface to open CAN port device.
Close the port by calling CloseHandle when operation is completed.
Syntax
HANDLE CreateFile(
LPCTSTR
lpFileName
,
DWORD
dwDesiredAccess
,
DWORD
dwShareMode
,
LPSECURITY_ATTRIBUTES
lpSecurityAttributes
,
DWORD
dwCreationDisposition
,
DWORD
dwFlagsAndAttributes
,
HANDLE
hTemplateFile
);
CreateFile
Open specified Can port.
CloseHandle
Close specified Can port.
DeviceIoControl
Send commands to drivers, including configuration, management
and getting status, etc.
ReadFile Read
data.
WriteFile Send
data.
GetOverLappedResult Wait until asynchronous operation is finished.
SetCommMask Set
mask.
GetCommMask Get
mask.
WaitCommEvent Wait specified event.
ClearCommError
Get error code with this function when receiving error event.
Note!
This driver does not support share open function, so the third parameter
must be set to 0.
Summary of Contents for PCI-1680U
Page 10: ...PCI 1680U 1682U User Manual 4 ...
Page 16: ...PCI 1680U 1682U User Manual 10 5 Click Next as the following 6 Click Next as the following ...
Page 22: ...PCI 1680U 1682U User Manual 16 ...
Page 26: ...PCI 1680U 1682U User Manual 20 Figure 3 2 PCI 1682U Silk Screen ...
Page 85: ...79 PCI 1680U 1682U User Manual Chapter 4 Software Requirements WDM CE ...
Page 90: ...PCI 1680U 1682U User Manual 84 4 8 2 2 Receive flow chart ...
Page 91: ...85 PCI 1680U 1682U User Manual Chapter 4 Software Requirements 4 8 2 3 Configure flow chart ...
Page 103: ...97 PCI 1680U 1682U User Manual Chapter 5 Pin Assignments and Wiring ...