|
| HIDevice (const USBDeviceDescriptor &descr, const ErrorStack &err=ErrorStack(), QObject *parent=nullptr) |
| Connects to the device with given vendor and product ID.
|
|
virtual | ~HIDevice () |
| Destructor.
|
|
bool | isOpen () const |
| Returns true if the connection is established.
|
|
bool | hid_send_recv (const unsigned char *data, unsigned nbytes, unsigned char *rdata, unsigned rlength, const ErrorStack &err=ErrorStack()) |
| Send command/data to the device and store response in rdata .
|
|
void | close () |
| Close connection to device.
|
|
| HIDevice (const USBDeviceDescriptor &descr, const ErrorStack &err=ErrorStack(), QObject *parent=nullptr) |
| Opens a connection to the device with given vendor and product ID.
|
|
virtual | ~HIDevice () |
| Destructor.
|
|
bool | isOpen () const |
| Returns true if the connection was established.
|
|
bool | hid_send_recv (const unsigned char *data, unsigned nbytes, unsigned char *rdata, unsigned rlength, const ErrorStack &err=ErrorStack()) |
| Send command/data to the device and store response in rdata .
|
|
void | close () |
| Close connection to device.
|
|
|
static void | read_callback (struct libusb_transfer *t) |
| Callback for response data.
|
|
static void | callback_input (void *context, IOReturn result, void *sender, IOHIDReportType type, uint32_t reportID, uint8_t *data, CFIndex nbytes) |
| Internal callback for response data.
|
|
static void | callback_open (void *context, IOReturn result, void *sender, IOHIDDeviceRef deviceRef) |
| Internal callback for device opend.
|
|
static void | callback_close (void *ontext, IOReturn result, void *sender, IOHIDDeviceRef deviceRef) |
| Internal callback for device closed.
|
|
Implements the HID radio interface using libusb.
Implements the HID radio interface MacOS X API.