com_CloseDevice
This function closes a device by Serial Port.
Declaration
BOOL
com_CloseDevice(HANDLE hDevice)
Parameters
hDevice A valid device handle.
Return value
TRUE if successful, FALSE otherwise.
Example
com_CloseDevice(hDevice);
Remarks
Please see “Serial_Communication.pdf” to set hardware for serial communication, and USB_LAB
-
KIT, USB_STARTER, USB_8PR are not supported by serial communication.
Device Type Table
Product
device_type
USB_16PIO
0x01
USB_LABKIT
0x02
USB_16PR
0x03
USB_STARTER
0x04
USB_8PR
0x06
USB_4PR
0x07
USB_8PI
0x08
USB_8RO
0x09
USB_16PI
0x0A
USB_16RO
0x0B
USB_32PI
0x0C
USB_32RO
0x0D
USB_IND
0x0E
USB_M_4IO
0x10