Changeset 159b91f4 in mainline
- Timestamp:
- 2011-04-03T17:00:34Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0b4e7ca
- Parents:
- 7526e3d
- Location:
- uspace/lib/usb
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/include/usb/pipes.h
r7526e3d r159b91f4 107 107 /** Interface number the endpoint must belong to (-1 for any). */ 108 108 int interface_no; 109 /** Alternate interface setting to choose. */ 110 int interface_setting; 109 111 /** Found descriptor fitting the description. */ 110 112 usb_standard_endpoint_descriptor_t *descriptor; -
uspace/lib/usb/src/devdrv.c
r7526e3d r159b91f4 135 135 dev->pipes[i].description = drv->endpoints[i]; 136 136 dev->pipes[i].interface_no = dev->interface_no; 137 dev->pipes[i].interface_setting = 0; 137 138 } 138 139 … … 439 440 } 440 441 442 441 443 /** 442 444 * @} -
uspace/lib/usb/src/pipesinit.c
r7526e3d r159b91f4 121 121 usb_endpoint_mapping_t *mapping, size_t mapping_count, 122 122 usb_endpoint_description_t *found_endpoint, 123 int interface_number )123 int interface_number, int interface_setting) 124 124 { 125 125 while (mapping_count > 0) { … … 127 127 || (mapping->interface_no == interface_number); 128 128 129 bool interface_setting_fits = (mapping->interface_setting < 0) 130 || (mapping->interface_setting == interface_setting); 131 129 132 bool endpoint_descriptions_fits = endpoint_fits_description( 130 133 mapping->description, found_endpoint); 131 134 132 if (interface_number_fits && endpoint_descriptions_fits) { 135 if (interface_number_fits 136 && interface_setting_fits 137 && endpoint_descriptions_fits) { 133 138 return mapping; 134 139 } … … 181 186 */ 182 187 usb_endpoint_mapping_t *ep_mapping = find_endpoint_mapping(mapping, 183 mapping_count, &description, interface->interface_number); 188 mapping_count, &description, 189 interface->interface_number, interface->alternate_setting); 184 190 if (ep_mapping == NULL) { 185 191 return ENOENT;
Note:
See TracChangeset
for help on using the changeset viewer.