Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/src/dump.c

    r582a0b8 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
Note: See TracChangeset for help on using the changeset viewer.