zoukankan      html  css  js  c++  java
  • usb之配置描述符

    配置描述符的打印是有 设备描述符中一个成员 __u8 bNumConfigurations; 打印出来的
    struct usb_config_descriptor {
    __u8 bLength;
    __u8 bDescriptorType;

    __le16 wTotalLength;
    __u8  bNumInterfaces;
    __u8  bConfigurationValue;
    __u8  iConfiguration;
    __u8  bmAttributes;
    __u8  bMaxPower;
    

    } attribute ((packed));

    struct usb_config_descriptor config;

    for(i=0;i<desc.bNumConfigurations;i++)
    {
    printf("config.bLength %d ",config.bLength);
    printf("config.bDescriptorType is %d ",config.bDescriptorType);
    printf("config.wTotalLength is %d ",config.wTotalLength);
    printf("config.bNumInterfaces is %d ",config.bNumInterfaces);
    printf("config.bConfigurationValue is %d ",config.bConfigurationValue);
    printf("config.iConfiguration is %d ",config.iConfiguration);
    printf("config.bmAttributes is %d ",config.bmAttributes);
    printf("config.bMaxPower is %d ",config.bMaxPower);
    }

    一勤天下无难事。
  • 相关阅读:
    hive学习
    spark Streaming
    spark sql
    参考
    数论基础
    2020.07.17模拟3
    2020.07.16模拟2
    关于Linux环境下的对拍
    2020.07.15模拟1
    三体
  • 原文地址:https://www.cnblogs.com/nowroot/p/14131303.html
Copyright © 2011-2022 走看看