Changeset 92574f4 in mainline for uspace/lib/usb/include/usb/pipes.h
- Timestamp:
- 2011-02-24T12:03:27Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e7b7ebd5
- Parents:
- 4837092 (diff), a80849c (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
r4837092 r92574f4 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 #include <d river.h>43 #include <ddf/driver.h> 42 44 43 45 /** … … 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 /** Interface number the endpoint must belong to (-1 for any). */ 110 const int interface_no; 111 /** Found descriptor fitting the description. */ 112 usb_standard_endpoint_descriptor_t *descriptor; 113 /** Interface the endpoint belongs to. */ 114 usb_standard_interface_descriptor_t *interface; 115 /** Whether the endpoint was actually found. */ 116 bool present; 117 } usb_endpoint_mapping_t; 118 119 int usb_device_connection_initialize_on_default_address( 120 usb_device_connection_t *, usb_hc_connection_t *); 82 121 int usb_device_connection_initialize_from_device(usb_device_connection_t *, 83 d evice_t *);122 ddf_dev_t *); 84 123 int usb_device_connection_initialize(usb_device_connection_t *, 85 124 devman_handle_t, usb_address_t); 86 125 126 int usb_device_get_assigned_interface(ddf_dev_t *); 127 87 128 int usb_endpoint_pipe_initialize(usb_endpoint_pipe_t *, 88 129 usb_device_connection_t *, 89 usb_endpoint_t, usb_transfer_type_t, usb_direction_t);130 usb_endpoint_t, usb_transfer_type_t, size_t, usb_direction_t); 90 131 int usb_endpoint_pipe_initialize_default_control(usb_endpoint_pipe_t *, 91 132 usb_device_connection_t *); 133 int usb_endpoint_pipe_initialize_from_configuration(usb_endpoint_mapping_t *, 134 size_t, uint8_t *, size_t, usb_device_connection_t *); 92 135 93 136 94 137 int usb_endpoint_pipe_start_session(usb_endpoint_pipe_t *); 95 138 int usb_endpoint_pipe_end_session(usb_endpoint_pipe_t *); 139 bool usb_endpoint_pipe_is_session_started(usb_endpoint_pipe_t *); 96 140 97 141 int usb_endpoint_pipe_read(usb_endpoint_pipe_t *, void *, size_t, size_t *); … … 103 147 void *, size_t); 104 148 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 149 #endif 120 150 /**
Note:
See TracChangeset
for help on using the changeset viewer.