1. struct usb_device_descriptor {
    __u8 bLength;//设备描述符的字节数大小,为0x12
    __u8 bDescriptorType;//描述符类型编号,为0x01 __le16 bcdUSB;//USB版本号
    __u8 bDeviceClass;//USB分配的设备类代码,0x01~0xfe为标准设备类,0xff为厂商自定义类型 //0x00不是在设备描述符中定义的,如HID
    __u8 bDeviceSubClass;//usb分配的子类代码,同上,值由USB规定和分配的
    __u8 bDeviceProtocol;//USB分配的设备协议代码,同上
    __u8 bMaxPacketSize0;//端点0的最大包的大小
    __le16 idVendor;//厂商编号
    __le16 idProduct;//产品编号
    __le16 bcdDevice;//设备出厂编号
    __u8 iManufacturer;//描述厂商字符串的索引
    __u8 iProduct;//描述产品字符串的索引
    __u8 iSerialNumber;//描述设备序列号字符串的索引
    __u8 bNumConfigurations;//可能的配置数量
    } __attribute__ ((packed)); struct usb_config_descriptor {
    __u8 bLength;//设备描述符的字节数大小,为0x12
    __u8 bDescriptorType;//描述符类型编号,为0x01
    __le16 wTotalLength;//配置所返回的所有数量的大小 __u8 bNumInterfaces;//此配置所支持的接口数量
    __u8 bConfigurationValue;//Set_Configuration命令需要的参数值
    __u8 iConfiguration;//描述该配置的字符串的索引值
    __u8 bmAttributes;//供电模式的选择
    __u8 bMaxPower;//设备从总线提取的最大电流
    } __attribute__ ((packed)); struct usb_interface_descriptor {
    __u8 bLength;//设备描述符的字节数大小,为0x12
    __u8 bDescriptorType;//描述符类型编号,为0x01 __u8 bInterfaceNumber;//接口的编号
    __u8 bAlternateSetting;//备用的接口描述符编号
    __u8 bNumEndpoints;//该接口使用端点数,不包括端点0
    __u8 bInterfaceClass;//接口类型
    __u8 bInterfaceSubClass;//接口子类型
    __u8 bInterfaceProtocol;//接口所遵循的协议
    __u8 iInterface;//描述该接口的字符串索引值
    } __attribute__ ((packed)); struct usb_endpoint_descriptor {
    __u8 bLength;//设备描述符的字节数大小,为0x12
    __u8 bDescriptorType;//描述符类型编号,为0x01 __u8 bEndpointAddress;//端点地址及输入输出属性
    __u8 bmAttributes;//端点的传输类型属性
    __le16 wMaxPacketSize;//端点收、发的最大包的大小
    __u8 bInterval;//主机查询端点的时间间隔 /* NOTE: these two are _only_ in audio endpoints. */
    /* use USB_DT_ENDPOINT*_SIZE in bLength, not sizeof. */
    __u8 bRefresh;
    __u8 bSynchAddress;
    } __attribute__ ((packed)); struct usb_string_descriptor {
    __u8 bLength;//设备描述符的字节数大小,为0x12
    __u8 bDescriptorType;//描述符类型编号,为0x01 __le16 wData[]; /* UTF-16LE encoded */
    } __attribute__ ((packed));

USB descriptor【转】的更多相关文章

  1. USB组合设备 Interface Association Descriptor (IAD)

    Communication Device Class,简称CDCUSB Compound Device,USB复合设备USB Composite Device,USB组合设备 摘要USB复合设备 Co ...

  2. usb驱动开发17之设备生命线

    拜会完了山头的几位大哥,还记得我们从哪里来要到哪里去吗?时刻不能忘记自身的使命啊.我们是从usb_submit_urb()最后的那个遗留问题usb_hcd_submit_urb()函数一路走来,现在就 ...

  3. 『翻译』Access USB Devices on the Web

    https://developers.google.com/web/updates/2016/03/access-usb-devices-on-the-web Access USB Devices o ...

  4. 【转】簡單講講 USB Human Interface Device

    原地址http://213style.blogspot.com/2013/09/usb-human-interface-device.html 恩,發本文的原因是看到了以前畢業的朋友在旁邊的對話框問了 ...

  5. Using a USB host controller security extension for controlling changes in and auditing USB topology

    Protecting computer systems from attacks that attempt to change USB topology and for ensuring that t ...

  6. USB 3.0规范中译本第9章 设备框架

    本文为CoryXie原创译文,转载及有任何问题请联系cory.xie#gmail.com. 设备框架可以被分成三层: 最底层是总线接口层,传送和接收包. 中间层处理在总线接口和设备的各种端点之间路由数 ...

  7. qq2440启动linux后插入u盘出现usb 1-1: device descriptor read/64, error -110,usb 1-1: device not accepting address 8, error -110

    上位机:ubuntu14.04 64bit 下位机:qq2440 交叉编译器:arm-linux-gcc 3.4.1 下位机使用的linux内核版本:kernel2.6.13 1.插入u盘时错误信息如 ...

  8. USB HID Report Descriptor 报告描述符详解

    Report descriptors are composed of pieces of information. Each piece of information is called an Ite ...

  9. 遍历 USB devcie,读取设备描述符 device descriptor【转】

    转自:http://blog.csdn.net/flyyyri/article/details/5480347 理论:    对于USB接口的设备,现在越来越多了.本篇我们就通过获取一个USB扫描仪设 ...

随机推荐

  1. Jackson 使用

    // 序列化出来的 JSON, 不包含值为 NULL 类型字段. mapper.setSerializationInclusion(Include.NON_NULL); Jackson provide ...

  2. NOI2010~NOI2018选做

    [NOI2010] [NOI2010]海拔 高度只需要0/1,所以一个合法方案就是一个割,平面图求最小割. [NOI2010]航空管制 反序拓扑排序,每次取出第一类限制最大的放置,这样做答案不会更劣. ...

  3. 51nod 1218 最长递增子序列 | 思维题

    51nod 1218 最长递增子序列 题面 给出一个序列,求哪些元素可能在某条最长上升子序列中,哪些元素一定在所有最长上升子序列中. 题解 YJY大嫂教导我们,如果以一个元素结尾的LIS长度 + 以它 ...

  4. 洛谷 P2022 有趣的数 解题报告

    P2022 有趣的数 题目描述 让我们来考虑1到N的正整数集合.让我们把集合中的元素按照字典序排列,例如当N=11时,其顺序应该为:1,10,11,2,3,4,5,6,7,8,9. 定义K在N个数中的 ...

  5. Xpack集成LDAP

    支持两种配置方式: The ldap realm supports two modes of operation, a user search mode and a mode with specifi ...

  6. 安装elasticsearch5.4.1集群和head插件

    这里用的系统版本是CentOS6.6. 192.168.3.56 ES01 192.168.3.49 ES02 192.168.3.57 ES03 1.为三个节点安装java环境 # yum inst ...

  7. Error:Could not find com.github.dcendents:android-maven-plugin:1.5.

    问题: Error:Could not find com.github.dcendents:android-maven-plugin:1.5.Searched in the following loc ...

  8. 手机数据抓包的N种方法

    手机数据抓包的N种方法 - xia_xia的博客 - 博客频道 - CSDN.NEThttp://blog.csdn.net/xia_xia0919/article/details/50606137 ...

  9. 解题:CEOI 2017 Mousetrap

    题外话: 这是制杖yd的交流题目 题面 首先把捕鼠夹所在的点提出来当根,然后这变成了一棵有根树,我们先来看耗子移动的影响 可以发现耗子往下走就回不来了,而且最后还会被困在一个叶子上,那么这个时候我们把 ...

  10. Python 类编码风格

    1.命名 类名:(1)单词首字母均大写 (2)不使用下划线 实例名+模块名:(1)小写格式 (2)下划线分隔单词 2.文档字符串 三引号:“““ ””” 每个类定义后面需要包含一个文档字符串,描述类的 ...