usb_config_descriptor struct usb_config_descriptor desc;//配置描述名称 /* USB_DT_CONFIG: Configuration descriptor information. * * USB_DT_OTHER_SPEED_CONFIG is the same descriptor, except that the * descriptor type is different. Highspeed-capable devices can look * different depending on what s...
一个USB设备只有一个USB设备描述符,可以有多个配置描述符,配置描述符定义如下: 265 /* USB_DT_CONFIG: Configuration descriptor information. 266 * 267 * USB_DT_OTHER_SPEED_CONFIG is the same descriptor, except that the 268 * descriptor type is different. Highspeed-capable devices can look 269 * ...
#define USB_DT_DEVICE_SIZE 18 代码语言:javascript 代码运行次数:0 运行 struct usb_config_descriptor { __u8 bLength; __u8 bDescriptorType; __le16 wTotalLength; __u8 bNumInterfaces; __u8 bConfigurationValue; __u8 iConfiguration; __u8 bmAttributes; __u8 bMaxPower; } __attribute__ ((pa...
描述符sizeof(USB_INTERFACE_DESCRIPTOR),// bLengthUSB_DT_INTERFACE,// bDescriptorTypeINTERFACE_NUMBER_0,// bInterfaceNumberALTERNATE_SETTING_0,// bAlternateSettingNUM_ENDPOINTS_INTERFACE_0,// bNumEndpoints/* 其他接口描述符字段... */// 第一个接口相关的端点描述符(例如IN端点)sizeof(USB_ENDPOINT...
/* USB_DT_CONFIG: Configuration descriptor information. * * USB_DT_OTHER_SPEED_CONFIG is the same descriptor, except that the * descriptor type is different. Highspeed-capable devices can look * different depending on what speed they're currently running. Only ...
__u8 bDescriptorType; //这里的值并不仅仅可以为USB_DT_CONFIG,还可以为USB_DT_OTHER_SPEED_CONFIG __le16 wTotalLength; //使用GET_DESCRIPTOR请求从设备里获得配置描述符信息时,返回的数据长度 __u8 bNumInterfaces; //这个配置包含的接口数量
... length = max((int) le16_to_cpu(desc->wTotalLength),USB_DT_CONFIG_SIZE); //通过wTotalLength,知道实际数据大小 bigbuffer = kmalloc(length, GFP_KERNEL); //然后再来分配足够大的空间 ... ... result = usb_get_descriptor(dev, USB_DT_CONFIG, cfgno,bigbuffer, length); //在调用一次...
desc.bDescriptorType = USB_DT_DEVICE; gi->cdev.desc.bcdDevice = cpu_to_le16(get_default_bcdDevice()); /* 设置configfs的usb_gadget_driver */ gi->composite.gadget_driver = configfs_driver_template; gi->composite.gadget_driver.function = kstrdup(name, GFP_KERNEL); gi->composite.name = ...
/var/davinci/driver/upgrade-tool --device_index -1 --component Usr_Base_Config --path userBaseConfig.bin 出现如下回显,表示升级userBaseConfig.bin文件成功。 {"device": 0, "succeed"} 升级“dt.img”文件。具体请参见生效DTB文件。 升级完成后重启生效。
int32_tUsbRawGetConfigDescriptor(constUsbRawDevice *rawDev, uint8_t configIndex,structUsbRawConfigDescriptor **config); (左右滑动,查看更多) (5) 分配Request,并根据不同的传输类型使用相应的接口对Request进行填充: int32_tUsbRawFillBulkRequest(conststructUsbRawRequest *request,constUsbRawHandle *devHand...