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/usbdev/include/usb/dev/pipes.h

    rf5e5f73 rdf6ded8  
    11/*
    22 * Copyright (c) 2011 Vojtech Horky
     3 * Copyright (c) 2018 Ondrej Hlavaty
    34 * All rights reserved.
    45 *
     
    4445
    4546#define CTRL_PIPE_MIN_PACKET_SIZE 8
     47
    4648/** Abstraction of a logical connection to USB device endpoint.
    47  * It encapsulates endpoint attributes (transfer type etc.).
     49 * It contains some vital information about the pipe.
    4850 * This endpoint must be bound with existing usb_device_connection_t
    4951 * (i.e. the wire to send data over).
    5052 */
    5153typedef struct {
    52         /** Endpoint number. */
    53         usb_endpoint_t endpoint_no;
    54 
    55         /** Endpoint transfer type. */
    56         usb_transfer_type_t transfer_type;
    57 
    58         /** Endpoint direction. */
    59         usb_direction_t direction;
    60 
    61         /** Maximum packet size for the endpoint. */
    62         size_t max_packet_size;
    63 
    64         /** Number of packets per frame/uframe.
    65          * Only valid for HS INT and ISO transfers. All others should set to 1*/
    66         unsigned packets;
     54        /** Pipe description received from HC */
     55        usb_pipe_desc_t desc;
    6756
    6857        /** Whether to automatically reset halt on the endpoint.
     
    7059         */
    7160        bool auto_reset_halt;
    72 
    7361        /** The connection used for sending the data. */
    7462        usb_dev_session_t *bus_session;
     
    10391        /** Found descriptor fitting the description. */
    10492        const usb_standard_endpoint_descriptor_t *descriptor;
     93        /** Relevant superspeed companion descriptor. */
     94        const usb_superspeed_endpoint_companion_descriptor_t
     95            *companion_descriptor;
    10596        /** Interface descriptor the endpoint belongs to. */
    10697        const usb_standard_interface_descriptor_t *interface;
     
    109100} usb_endpoint_mapping_t;
    110101
    111 errno_t usb_pipe_initialize(usb_pipe_t *, usb_endpoint_t, usb_transfer_type_t,
    112     size_t, usb_direction_t, unsigned, usb_dev_session_t *);
     102errno_t usb_pipe_initialize(usb_pipe_t *, usb_dev_session_t *);
    113103errno_t usb_pipe_initialize_default_control(usb_pipe_t *, usb_dev_session_t *);
    114104
    115 errno_t usb_pipe_probe_default_control(usb_pipe_t *);
    116105errno_t usb_pipe_initialize_from_configuration(usb_endpoint_mapping_t *,
    117106    size_t, const uint8_t *, size_t, usb_dev_session_t *);
    118107
    119 errno_t usb_pipe_register(usb_pipe_t *, unsigned);
     108errno_t usb_pipe_register(usb_pipe_t *,
     109    const usb_standard_endpoint_descriptor_t *,
     110    const usb_superspeed_endpoint_companion_descriptor_t *);
    120111errno_t usb_pipe_unregister(usb_pipe_t *);
    121112
    122113errno_t usb_pipe_read(usb_pipe_t *, void *, size_t, size_t *);
    123114errno_t usb_pipe_write(usb_pipe_t *, const void *, size_t);
     115
     116errno_t usb_pipe_read_dma(usb_pipe_t *, void *, void *, size_t, size_t *);
     117errno_t usb_pipe_write_dma(usb_pipe_t *, void *, void *, size_t);
    124118
    125119errno_t usb_pipe_control_read(usb_pipe_t *, const void *, size_t,
     
    128122    const void *, size_t);
    129123
     124void *usb_pipe_alloc_buffer(usb_pipe_t *, size_t);
     125void usb_pipe_free_buffer(usb_pipe_t *, void *);
    130126#endif
    131127/**
Note: See TracChangeset for help on using the changeset viewer.