Using the QuickUSB Library
QuickUsbReadPort
Purpose
Read a series of bytes from the specified port.
Parameters
hDevice: A HANDLE that was returned from a call to QuickUsbOpen.
address: The port address. Ports are addressed 0 to 4 corresponding to
port A-E.
data:
A pointer to an array of bytes in which to place the data. This
buffer must be at least ‘length’ bytes long.
length:
A pointer to the number of bytes to read from the port. The
bytes are read sequentially. The maximum length is 64 bytes.
Returns
A non-zero value if successful, 0 otherwise. Also returns the read value in
value if successful. Otherwise value is not modified.
Notes
None
QuickUsbWritePort
Purpose
None
Parameters
hDevice: A HANDLE that was returned from a call to QuickUsbOpen.
address: The port address. Ports are addressed 0 to 4 corresponding to
port A-E.
data:
A pointer to an array of bytes to send out the port. This buffer
must be at least ‘length’ bytes long.
length:
A pointer to the number of bytes to write to the port. The bytes
are written sequentially. The maximum length is 64 bytes.
Returns
A non-zero value if successful, 0 otherwise.
Notes
None
General-Purpose
I/O
63