Changeset 67b6fc5 in mainline for uspace/lib/usb/include/usb/pipes.h


Ignore:
Timestamp:
2011-02-12T03:23:39Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
600733e
Parents:
e0df6c2 (diff), 8f5b6561 (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.
Message:

Development branch merge

File:
1 edited

Legend:

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

    re0df6c2 r67b6fc5  
    3838#include <sys/types.h>
    3939#include <usb/usb.h>
     40#include <usb/descriptor.h>
    4041#include <ipc/devman.h>
    4142#include <driver.h>
     
    7374        usb_direction_t direction;
    7475
     76        /** Maximum packet size for the endpoint. */
     77        size_t max_packet_size;
     78
    7579        /** Phone to the host controller.
    7680         * Negative when no session is active.
     
    7983} usb_endpoint_pipe_t;
    8084
     85
     86/** Description of endpoint characteristics. */
     87typedef struct {
     88        /** Transfer type (e.g. control or interrupt). */
     89        usb_transfer_type_t transfer_type;
     90        /** Transfer direction (to or from a device). */
     91        usb_direction_t direction;
     92        /** Interface class this endpoint belongs to (-1 for any). */
     93        int interface_class;
     94        /** Interface subclass this endpoint belongs to (-1 for any). */
     95        int interface_subclass;
     96        /** Interface protocol this endpoint belongs to (-1 for any). */
     97        int interface_protocol;
     98        /** Extra endpoint flags. */
     99        unsigned int flags;
     100} usb_endpoint_description_t;
     101
     102/** Mapping of endpoint pipes and endpoint descriptions. */
     103typedef struct {
     104        /** Endpoint pipe. */
     105        usb_endpoint_pipe_t *pipe;
     106        /** Endpoint description. */
     107        const usb_endpoint_description_t *description;
     108        /** Found descriptor fitting the description. */
     109        usb_standard_endpoint_descriptor_t *descriptor;
     110        /** Interface the endpoint belongs to. */
     111        usb_standard_interface_descriptor_t *interface;
     112        /** Whether the endpoint was actually found. */
     113        bool present;
     114} usb_endpoint_mapping_t;
    81115
    82116int usb_device_connection_initialize_from_device(usb_device_connection_t *,
     
    87121int usb_endpoint_pipe_initialize(usb_endpoint_pipe_t *,
    88122    usb_device_connection_t *,
    89     usb_endpoint_t, usb_transfer_type_t, usb_direction_t);
     123    usb_endpoint_t, usb_transfer_type_t, size_t, usb_direction_t);
    90124int usb_endpoint_pipe_initialize_default_control(usb_endpoint_pipe_t *,
    91125    usb_device_connection_t *);
     126int usb_endpoint_pipe_initialize_from_configuration(usb_endpoint_mapping_t *,
     127    size_t, uint8_t *, size_t, usb_device_connection_t *);
    92128
    93129
Note: See TracChangeset for help on using the changeset viewer.