|
USBIP C library 0.7.0
Virtual USB devices & host drivers over USB/IP
|
One generic HID interface: a single instance of the class on a device. More...
#include <classes/hid.h>
Data Fields | |
| int | index |
| 0-based HID instance on this device, in hid_add() order | |
| const char * | name |
hid_opts::name, or "" (never NULL) | |
| void * | user |
| hid_opts::user, passed straight through | |
| int | interface_number |
| This interface's bInterfaceNumber | |
| uint8_t | in_ep |
| Interrupt IN address actually assigned (a second HID interface is relocated off the default 0x81) | |
| uint8_t | out_ep |
| Interrupt OUT address assigned, 0 if none | |
| uint8_t | protocol |
| HID_REPORT_PROTOCOL/HID_BOOT_PROTOCOL | |
| uint8_t | idle |
| Current idle duration, in 4 ms units | |
| usbip_device * | dev |
| The owning device | |
| usbip_function * | func |
| The underlying function - escape hatch to the core usbip_device.h API | |
One generic HID interface: a single instance of the class on a device.
Create one with hid_add(); it stays valid for the life of the device. The fields are maintained by the class and are read-only to the app - they are here so a callback can tell which interface fired and how it is configured without keeping its own table. protocol and idle track what the host last set.
Distinct from the other classes' handles, so mixing them up is a compile error rather than a misread state block. A device may carry several: call hid_add() once each.
| int hid_iface::index |
0-based HID instance on this device, in hid_add() order
| const char* hid_iface::name |
hid_opts::name, or "" (never NULL)
| void* hid_iface::user |
hid_opts::user, passed straight through
| int hid_iface::interface_number |
This interface's bInterfaceNumber
| uint8_t hid_iface::in_ep |
Interrupt IN address actually assigned (a second HID interface is relocated off the default 0x81)
| uint8_t hid_iface::out_ep |
Interrupt OUT address assigned, 0 if none
| uint8_t hid_iface::protocol |
| uint8_t hid_iface::idle |
Current idle duration, in 4 ms units
| usbip_device* hid_iface::dev |
The owning device
| usbip_function* hid_iface::func |
The underlying function - escape hatch to the core usbip_device.h API