Instrument Neutral Distributed Interface INDI
2.0.2
|
Functions | |
HID_API_EXPORT hid_device *HID_API_CALL | hid_open (unsigned short vendor_id, unsigned short product_id, const wchar_t *serial_number) |
Open a HID device using a Vendor ID (VID), Product ID (PID) and optionally a serial number. More... | |
int HID_API_EXPORT HID_API_CALL | hid_read (hid_device *device, unsigned char *data, size_t length) |
Read an Input report from a HID device. More... | |
HID_API_EXPORT hid_device* HID_API_CALL hid_open | ( | unsigned short | vendor_id, |
unsigned short | product_id, | ||
const wchar_t * | serial_number | ||
) |
Open a HID device using a Vendor ID (VID), Product ID (PID) and optionally a serial number.
If serial_number
is NULL, the first device with the specified VID and PID is opened.
vendor_id | The Vendor ID (VID) of the device to open. |
product_id | The Product ID (PID) of the device to open. |
serial_number | The Serial Number of the device to open (Optionally NULL). |
Definition at line 612 of file hid_libusb.c.
int HID_API_EXPORT HID_API_CALL hid_read | ( | hid_device * | device, |
unsigned char * | data, | ||
size_t | length | ||
) |
Read an Input report from a HID device.
Input reports are returned
to the host through the INTERRUPT IN endpoint. The first byte will contain the Report number if the device uses numbered reports.
device | A device handle returned from hid_open(). |
data | A buffer to put the read data into. |
length | The number of bytes to read. For devices with multiple reports, make sure to read an extra byte for the report number. |
Definition at line 1095 of file hid_libusb.c.