Changeset df6ded8 in mainline for uspace/lib/usb/src/dump.c


Ignore:
Timestamp:
2018-02-28T16:37:50Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1b20da0
Parents:
f5e5f73 (diff), b2dca8de (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jakub Jermar <jakub@…> (2018-02-28 16:06:42)
git-committer:
Jakub Jermar <jakub@…> (2018-02-28 16:37:50)
Message:

Merge github.com:helenos-xhci-team/helenos

This commit merges support for USB 3 and generally refactors, fixes,
extends and cleans up the existing USB framework.

Notable additions and features:

  • new host controller driver has been implemented to control various xHC models (among others, NEC Renesas uPD720200)
  • isochronous data transfer mode
  • support for explicit USB device removal
  • USB tablet driver
File:
1 edited

Legend:

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

    rf5e5f73 rdf6ded8  
    11/*
    22 * Copyright (c) 2011 Vojtech Horky
     3 * Copyright (c) 2018 Ondrej Hlavaty
    34 * All rights reserved.
    45 *
     
    6162static void usb_dump_descriptor_endpoint(FILE *, const char *, const char *,
    6263    const uint8_t *, size_t);
     64static void usb_dump_descriptor_superspeed_endpoint_companion(FILE *, const char *, const char *,
     65    const uint8_t *, size_t);
    6366static void usb_dump_descriptor_hid(FILE *, const char *, const char *,
    6467    const uint8_t *, size_t);
     
    7578        { USB_DESCTYPE_INTERFACE, usb_dump_descriptor_interface },
    7679        { USB_DESCTYPE_ENDPOINT, usb_dump_descriptor_endpoint },
     80        { USB_DESCTYPE_SSPEED_EP_COMPANION, usb_dump_descriptor_superspeed_endpoint_companion },
    7781        { USB_DESCTYPE_HID, usb_dump_descriptor_hid },
    7882        { USB_DESCTYPE_HUB, usb_dump_descriptor_hub },
     
    238242        PRINTLINE("wMaxPacketSize = %d", d->max_packet_size);
    239243        PRINTLINE("bInterval = %dms", d->poll_interval);
     244}
     245
     246static void usb_dump_descriptor_superspeed_endpoint_companion(FILE *output,
     247    const char *line_prefix, const char *line_suffix,
     248    const uint8_t *descriptor, size_t descriptor_length)
     249{
     250        usb_superspeed_endpoint_companion_descriptor_t *d
     251           = (usb_superspeed_endpoint_companion_descriptor_t *) descriptor;
     252        if (descriptor_length < sizeof(*d)) {
     253                return;
     254        }
     255
     256        PRINTLINE("bLength = %u", d->length);
     257        PRINTLINE("bDescriptorType = 0x%02X", d->descriptor_type);
     258        PRINTLINE("bMaxBurst = %u", d->max_burst);
     259        PRINTLINE("bmAttributes = %d", d->attributes);
     260        PRINTLINE("wBytesPerInterval = %u", d->bytes_per_interval);
    240261}
    241262
Note: See TracChangeset for help on using the changeset viewer.