Changeset 18cb870 in mainline
- Timestamp:
- 2011-02-20T17:02:09Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8ba18c6
- Parents:
- 27a0012
- Location:
- uspace/lib/usb
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/include/usb/pipes.h
r27a0012 r18cb870 107 107 /** Endpoint description. */ 108 108 const usb_endpoint_description_t *description; 109 /** Interface number the endpoint must belong to (-1 for any). */ 110 const int interface_no; 109 111 /** Found descriptor fitting the description. */ 110 112 usb_standard_endpoint_descriptor_t *descriptor; -
uspace/lib/usb/src/pipesinit.c
r27a0012 r18cb870 109 109 * @param mapping_count Number of endpoint mappings in @p mapping. 110 110 * @param found_endpoint Description of found endpoint. 111 * @param interface_number Number of currently processed interface. 111 112 * @return Endpoint mapping corresponding to @p found_endpoint. 112 113 * @retval NULL No corresponding endpoint found. … … 114 115 static usb_endpoint_mapping_t *find_endpoint_mapping( 115 116 usb_endpoint_mapping_t *mapping, size_t mapping_count, 116 usb_endpoint_description_t *found_endpoint) 117 usb_endpoint_description_t *found_endpoint, 118 int interface_number) 117 119 { 118 120 while (mapping_count > 0) { 119 if (endpoint_fits_description(mapping->description, 120 found_endpoint)) { 121 bool interface_number_fits = (mapping->interface_no < 0) 122 || (mapping->interface_no == interface_number); 123 124 bool endpoint_descriptions_fits = endpoint_fits_description( 125 mapping->description, found_endpoint); 126 127 if (interface_number_fits && endpoint_descriptions_fits) { 121 128 return mapping; 122 129 } … … 169 176 */ 170 177 usb_endpoint_mapping_t *ep_mapping = find_endpoint_mapping(mapping, 171 mapping_count, &description );178 mapping_count, &description, interface->interface_number); 172 179 if (ep_mapping == NULL) { 173 180 return ENOENT;
Note:
See TracChangeset
for help on using the changeset viewer.