Changeset 50ba203 in mainline for uspace/lib/usb/include/usb/pipes.h
- Timestamp:
- 2011-02-20T15:46:48Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6bb83c7
- Parents:
- d81ef61c (diff), 0c00dac (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/include/usb/pipes.h
rd81ef61c r50ba203 31 31 */ 32 32 /** @file 33 * Communication between device drivers and host controller driver.33 * USB pipes representation. 34 34 */ 35 35 #ifndef LIBUSB_PIPES_H_ … … 38 38 #include <sys/types.h> 39 39 #include <usb/usb.h> 40 #include <usb/usbdevice.h> 41 #include <usb/descriptor.h> 40 42 #include <ipc/devman.h> 41 43 #include <driver.h> … … 73 75 usb_direction_t direction; 74 76 77 /** Maximum packet size for the endpoint. */ 78 size_t max_packet_size; 79 75 80 /** Phone to the host controller. 76 81 * Negative when no session is active. … … 80 85 81 86 87 /** Description of endpoint characteristics. */ 88 typedef struct { 89 /** Transfer type (e.g. control or interrupt). */ 90 usb_transfer_type_t transfer_type; 91 /** Transfer direction (to or from a device). */ 92 usb_direction_t direction; 93 /** Interface class this endpoint belongs to (-1 for any). */ 94 int interface_class; 95 /** Interface subclass this endpoint belongs to (-1 for any). */ 96 int interface_subclass; 97 /** Interface protocol this endpoint belongs to (-1 for any). */ 98 int interface_protocol; 99 /** Extra endpoint flags. */ 100 unsigned int flags; 101 } usb_endpoint_description_t; 102 103 /** Mapping of endpoint pipes and endpoint descriptions. */ 104 typedef struct { 105 /** Endpoint pipe. */ 106 usb_endpoint_pipe_t *pipe; 107 /** Endpoint description. */ 108 const usb_endpoint_description_t *description; 109 /** Found descriptor fitting the description. */ 110 usb_standard_endpoint_descriptor_t *descriptor; 111 /** Interface the endpoint belongs to. */ 112 usb_standard_interface_descriptor_t *interface; 113 /** Whether the endpoint was actually found. */ 114 bool present; 115 } usb_endpoint_mapping_t; 116 117 int usb_device_connection_initialize_on_default_address( 118 usb_device_connection_t *, usb_hc_connection_t *); 82 119 int usb_device_connection_initialize_from_device(usb_device_connection_t *, 83 120 device_t *); … … 87 124 int usb_endpoint_pipe_initialize(usb_endpoint_pipe_t *, 88 125 usb_device_connection_t *, 89 usb_endpoint_t, usb_transfer_type_t, usb_direction_t);126 usb_endpoint_t, usb_transfer_type_t, size_t, usb_direction_t); 90 127 int usb_endpoint_pipe_initialize_default_control(usb_endpoint_pipe_t *, 91 128 usb_device_connection_t *); 129 int usb_endpoint_pipe_initialize_from_configuration(usb_endpoint_mapping_t *, 130 size_t, uint8_t *, size_t, usb_device_connection_t *); 92 131 93 132 … … 103 142 void *, size_t); 104 143 105 106 107 int usb_endpoint_pipe_async_read(usb_endpoint_pipe_t *, void *, size_t,108 size_t *, usb_handle_t *);109 int usb_endpoint_pipe_async_write(usb_endpoint_pipe_t *, void *, size_t,110 usb_handle_t *);111 112 int usb_endpoint_pipe_async_control_read(usb_endpoint_pipe_t *, void *, size_t,113 void *, size_t, size_t *, usb_handle_t *);114 int usb_endpoint_pipe_async_control_write(usb_endpoint_pipe_t *, void *, size_t,115 void *, size_t, usb_handle_t *);116 117 int usb_endpoint_pipe_wait_for(usb_endpoint_pipe_t *, usb_handle_t);118 119 144 #endif 120 145 /**
Note:
See TracChangeset
for help on using the changeset viewer.