Download LPC / LP4 User Manual

Transcript
ISA-Bus Interface Manual
4.4.5
Programming Instructions
GetVersion
Returns the version number of the driver as unicode string, e.g.
TEXT("LPCDRV v1.00").
Syntax:
#define IOCTL_GETVERSION 0x43504C00
result = DeviceIoControl(ni_handle, IOCTL_GETVERSION,
szInfo, sizeof(szInfo), & NULL, 0, BytesReturned, NULL);
4.4.6
Parameter
Type
ni_handle
HANDLE
szInfo
TCHAR*
BytesReturned DWORD
Description
file handle of the LON device
Buffer for version string
length of the string [bytes]
= (number of characters + 1) * 2
Return value Type
Result
BOOL
Description
FALSE if buffer is too small,
else TRUE
Watcher
Depending on the buffer contents, several watcher commands (including download of firmware for watcher module) are initiated.
Syntax:
#define IOCTL_WATCHER
0x43504C01
result = DeviceIoControl(ni_handle, IOCTL_WATCHER,
inbuffer, sizeof(inbuffer), outbuffer, sizeof(outbuffer),
&BytesReturned, NULL);
Parameter
ni_handle
outbuffer
Type
HANDLE
BYTE*
inbuffer
BYTE*
Archiv/96A0016E01, V3.9, June 2014
BytesReturned DWORD
Return value Type
Result
BOOL
Description
file handle of the LON device
pointer to the buffer that contains the commands and data to send to the watcher
pointer to the buffer that contains the data sent
by the watcher
number of bytes which are received by the
watcher.
OK, if BytesReturned >= 2
Description
FALSE, if no Watcher was
found, else TRUE
41/45