struct usb_config_descriptor
{
__u8 bLength;
__u8 bDescriptorType;
__u8 wTotalLength;
__u8 bNumberInterfaces;
__u8 bConfigurationValue;
__u8 iConfigurations;
__u8 bmAttributes;
__u8 bMaxPower;
}
bLength 对于配置描述符 长度为9
bDescriptorType 0x02
wTotalLength 即为 widechar 代表了所有描述符加起来的长度 即 当前配置下当前使用接口 以及端点描述符号的长度;
bNumberInterface 就是这个配置拥有的接口。
在Libusb中要选择一个配置使用API函数libusb_set_configuration(libusb_device_handle * , int configurationNum);