Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 7f70d1c in mainline


Ignore:
Timestamp:
2017-12-19T09:07:15Z (4 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master
Children:
0bb4738
Parents:
32fb6bce
Message:

libusb: print also superspeed ep companion descriptor

Location:
uspace
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/usbinfo/dump.c

    r32fb6bce r7f70d1c  
    6161                INDENT INDENT INDENT,
    6262                INDENT INDENT INDENT INDENT,
    63                 INDENT INDENT INDENT INDENT INDENT
     63                INDENT INDENT INDENT INDENT INDENT,
     64                INDENT INDENT INDENT INDENT INDENT INDENT,
    6465        };
    6566        static size_t indents_count = sizeof(indents)/sizeof(indents[0]);
  • uspace/app/usbinfo/info.c

    r32fb6bce r7f70d1c  
    151151}
    152152
     153static void dump_descriptor_tree_brief_superspeed_endpoint_companion(const char *prefix,
     154    usb_superspeed_endpoint_companion_descriptor_t *descriptor)
     155{
     156        printf("%sSuperspeed endpoint companion\n", prefix);
     157}
     158
    153159static void dump_descriptor_tree_brief_hid(const char *prefix,
    154160    usb_standard_hid_descriptor_t *descriptor)
     
    206212                    usb_standard_endpoint_descriptor_t,
    207213                    dump_descriptor_tree_brief_endpoint);
     214                _BRANCH(USB_DESCTYPE_SSPEED_EP_COMPANION,
     215                    usb_superspeed_endpoint_companion_descriptor_t,
     216                    dump_descriptor_tree_brief_superspeed_endpoint_companion);
    208217                _BRANCH(USB_DESCTYPE_HID,
    209218                    usb_standard_hid_descriptor_t,
  • uspace/lib/usb/src/dump.c

    r32fb6bce r7f70d1c  
    6161static void usb_dump_descriptor_endpoint(FILE *, const char *, const char *,
    6262    const uint8_t *, size_t);
     63static void usb_dump_descriptor_superspeed_endpoint_companion(FILE *, const char *, const char *,
     64    const uint8_t *, size_t);
    6365static void usb_dump_descriptor_hid(FILE *, const char *, const char *,
    6466    const uint8_t *, size_t);
     
    7577        { USB_DESCTYPE_INTERFACE, usb_dump_descriptor_interface },
    7678        { USB_DESCTYPE_ENDPOINT, usb_dump_descriptor_endpoint },
     79        { USB_DESCTYPE_SSPEED_EP_COMPANION, usb_dump_descriptor_superspeed_endpoint_companion },
    7780        { USB_DESCTYPE_HID, usb_dump_descriptor_hid },
    7881        { USB_DESCTYPE_HUB, usb_dump_descriptor_hub },
     
    238241        PRINTLINE("wMaxPacketSize = %d", d->max_packet_size);
    239242        PRINTLINE("bInterval = %dms", d->poll_interval);
     243}
     244
     245static void usb_dump_descriptor_superspeed_endpoint_companion(FILE *output,
     246    const char *line_prefix, const char *line_suffix,
     247    const uint8_t *descriptor, size_t descriptor_length)
     248{
     249        usb_superspeed_endpoint_companion_descriptor_t *d
     250           = (usb_superspeed_endpoint_companion_descriptor_t *) descriptor;
     251        if (descriptor_length < sizeof(*d)) {
     252                return;
     253        }
     254
     255        PRINTLINE("bLength = %u", d->length);
     256        PRINTLINE("bDescriptorType = 0x%02X", d->descriptor_type);
     257        PRINTLINE("bMaxBurst = %u", d->max_burst);
     258        PRINTLINE("bmAttributes = %d", d->attributes);
     259        PRINTLINE("wBytesPerInterval = %u", d->bytes_per_interval);
    240260}
    241261
  • uspace/lib/usbdev/src/dp.c

    r32fb6bce r7f70d1c  
    6262        NESTING(CONFIGURATION, INTERFACE),
    6363        NESTING(INTERFACE, ENDPOINT),
     64        NESTING(ENDPOINT, SSPEED_EP_COMPANION),
    6465        NESTING(INTERFACE, HUB),
    6566        NESTING(INTERFACE, HID),
Note: See TracChangeset for help on using the changeset viewer.