Changeset 51b46f2 in mainline for uspace/lib/usb/src/request.c
- Timestamp:
- 2011-03-01T15:39:52Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e135751
- Parents:
- 0e3505a (diff), cc44f7e (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/src/request.c
r0e3505a r51b46f2 36 36 #include <errno.h> 37 37 #include <assert.h> 38 #include <usb/debug.h> 38 39 39 40 #define MAX_DATA_LENGTH ((size_t)(0xFFFF)) … … 209 210 */ 210 211 int usb_request_get_descriptor(usb_endpoint_pipe_t *pipe, 211 usb_request_type_t request_type, 212 usb_request_type_t request_type, usb_request_recipient_t recipient, 212 213 uint8_t descriptor_type, uint8_t descriptor_index, 213 214 uint16_t language, … … 224 225 225 226 return usb_control_request_get(pipe, 226 request_type, USB_REQUEST_RECIPIENT_DEVICE,227 request_type, recipient, 227 228 USB_DEVREQ_GET_DESCRIPTOR, 228 229 wValue, language, … … 242 243 */ 243 244 int usb_request_get_descriptor_alloc(usb_endpoint_pipe_t * pipe, 244 usb_request_type_t request_type, 245 usb_request_type_t request_type, usb_request_recipient_t recipient, 245 246 uint8_t descriptor_type, uint8_t descriptor_index, 246 247 uint16_t language, … … 258 259 uint8_t tmp_buffer[1]; 259 260 size_t bytes_transfered; 260 rc = usb_request_get_descriptor(pipe, request_type, 261 rc = usb_request_get_descriptor(pipe, request_type, recipient, 261 262 descriptor_type, descriptor_index, language, 262 263 &tmp_buffer, 1, &bytes_transfered); … … 283 284 } 284 285 285 rc = usb_request_get_descriptor(pipe, request_type, 286 rc = usb_request_get_descriptor(pipe, request_type, recipient, 286 287 descriptor_type, descriptor_index, language, 287 288 buffer, size, &bytes_transfered); … … 320 321 usb_standard_device_descriptor_t descriptor_tmp; 321 322 int rc = usb_request_get_descriptor(pipe, 322 USB_REQUEST_TYPE_STANDARD, USB_ DESCTYPE_DEVICE,323 0, 0,323 USB_REQUEST_TYPE_STANDARD, USB_REQUEST_RECIPIENT_DEVICE, 324 USB_DESCTYPE_DEVICE, 0, 0, 324 325 &descriptor_tmp, sizeof(descriptor_tmp), 325 326 &actually_transferred); … … 366 367 usb_standard_configuration_descriptor_t descriptor_tmp; 367 368 int rc = usb_request_get_descriptor(pipe, 368 USB_REQUEST_TYPE_STANDARD, USB_ DESCTYPE_CONFIGURATION,369 index, 0,369 USB_REQUEST_TYPE_STANDARD, USB_REQUEST_RECIPIENT_DEVICE, 370 USB_DESCTYPE_CONFIGURATION, index, 0, 370 371 &descriptor_tmp, sizeof(descriptor_tmp), 371 372 &actually_transferred); … … 406 407 407 408 return usb_request_get_descriptor(pipe, 408 USB_REQUEST_TYPE_STANDARD, USB_ DESCTYPE_CONFIGURATION,409 index, 0,409 USB_REQUEST_TYPE_STANDARD, USB_REQUEST_RECIPIENT_DEVICE, 410 USB_DESCTYPE_CONFIGURATION, index, 0, 410 411 descriptor, descriptor_size, actual_size); 411 412 } … … 452 453 size_t string_descriptor_size = 0; 453 454 rc = usb_request_get_descriptor_alloc(pipe, 454 USB_REQUEST_TYPE_STANDARD, USB_DESCTYPE_STRING, 0, 0, 455 USB_REQUEST_TYPE_STANDARD, USB_REQUEST_RECIPIENT_DEVICE, 456 USB_DESCTYPE_STRING, 0, 0, 455 457 (void **) &string_descriptor, &string_descriptor_size); 456 458 if (rc != EOK) { … … 535 537 size_t string_size; 536 538 rc = usb_request_get_descriptor_alloc(pipe, 537 USB_REQUEST_TYPE_STANDARD, USB_ DESCTYPE_STRING,538 index, uint16_host2usb(lang),539 USB_REQUEST_TYPE_STANDARD, USB_REQUEST_RECIPIENT_DEVICE, 540 USB_DESCTYPE_STRING, index, uint16_host2usb(lang), 539 541 (void **) &string, &string_size); 540 542 if (rc != EOK) {
Note:
See TracChangeset
for help on using the changeset viewer.