Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdev/include/usb/dev/pipes.h

    rbb655dab r8d2dd7f2  
    4444
    4545#define CTRL_PIPE_MIN_PACKET_SIZE 8
    46 
    4746/** Abstraction of a logical connection to USB device endpoint.
    48  * It contains some vital information about the pipe.
     47 * It encapsulates endpoint attributes (transfer type etc.).
    4948 * This endpoint must be bound with existing usb_device_connection_t
    5049 * (i.e. the wire to send data over).
    5150 */
    5251typedef struct {
    53         /** Pipe description received from HC */
    54         usb_pipe_desc_t desc;
     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;
    5567
    5668        /** Whether to automatically reset halt on the endpoint.
     
    5870         */
    5971        bool auto_reset_halt;
     72
    6073        /** The connection used for sending the data. */
    6174        usb_dev_session_t *bus_session;
     
    90103        /** Found descriptor fitting the description. */
    91104        const usb_standard_endpoint_descriptor_t *descriptor;
    92         /** Relevant superspeed companion descriptor. */
    93         const usb_superspeed_endpoint_companion_descriptor_t *companion_descriptor;
    94105        /** Interface descriptor the endpoint belongs to. */
    95106        const usb_standard_interface_descriptor_t *interface;
     
    98109} usb_endpoint_mapping_t;
    99110
    100 int usb_pipe_initialize(usb_pipe_t *, usb_dev_session_t *);
     111int usb_pipe_initialize(usb_pipe_t *, usb_endpoint_t, usb_transfer_type_t,
     112    size_t, usb_direction_t, unsigned, usb_dev_session_t *);
    101113int usb_pipe_initialize_default_control(usb_pipe_t *, usb_dev_session_t *);
    102114
     115int usb_pipe_probe_default_control(usb_pipe_t *);
    103116int usb_pipe_initialize_from_configuration(usb_endpoint_mapping_t *,
    104117    size_t, const uint8_t *, size_t, usb_dev_session_t *);
    105118
    106 int usb_pipe_register(usb_pipe_t *, const usb_standard_endpoint_descriptor_t *, const usb_superspeed_endpoint_companion_descriptor_t *);
     119int usb_pipe_register(usb_pipe_t *, unsigned);
    107120int usb_pipe_unregister(usb_pipe_t *);
    108121
Note: See TracChangeset for help on using the changeset viewer.