USBIP C library 0.7.0
Virtual USB devices & host drivers over USB/IP
Loading...
Searching...
No Matches
hid_iface Struct Reference

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_devicedev
 The owning device

 
usbip_functionfunc
 The underlying function - escape hatch to the core usbip_device.h API

 

Detailed Description

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.

Field Documentation

◆ index

int hid_iface::index

0-based HID instance on this device, in hid_add() order

◆ name

const char* hid_iface::name

hid_opts::name, or "" (never NULL)

◆ user

void* hid_iface::user

hid_opts::user, passed straight through

◆ interface_number

int hid_iface::interface_number

This interface's bInterfaceNumber

◆ in_ep

uint8_t hid_iface::in_ep

Interrupt IN address actually assigned (a second HID interface is relocated off the default 0x81)

◆ out_ep

uint8_t hid_iface::out_ep

Interrupt OUT address assigned, 0 if none

◆ protocol

uint8_t hid_iface::protocol

◆ idle

uint8_t hid_iface::idle

Current idle duration, in 4 ms units

◆ dev

usbip_device* hid_iface::dev

The owning device

◆ func

usbip_function* hid_iface::func

The underlying function - escape hatch to the core usbip_device.h API


The documentation for this struct was generated from the following file: