Changes in uspace/lib/usbdev/src/request.c [33b8d024:5a6cc679] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/src/request.c
r33b8d024 r5a6cc679 118 118 * @param data_size Size of the @p data buffer 119 119 * (in native endianness). 120 * @param actual_data_size Actual size of transfer ed data120 * @param actual_data_size Actual size of transferred data 121 121 * (in native endianness). 122 122 * … … 183 183 184 184 uint16_t status_usb_endianess; 185 size_t data_transfer ed_size;185 size_t data_transferred_size; 186 186 errno_t rc = usb_control_request_get(pipe, USB_REQUEST_TYPE_STANDARD, 187 187 recipient, USB_DEVREQ_GET_STATUS, 0, uint16_host2usb(index), 188 &status_usb_endianess, 2, &data_transfer ed_size);189 if (rc != EOK) { 190 return rc; 191 } 192 if (data_transfer ed_size != 2) {188 &status_usb_endianess, 2, &data_transferred_size); 189 if (rc != EOK) { 190 return rc; 191 } 192 if (data_transferred_size != 2) { 193 193 return ELIMIT; 194 194 } … … 314 314 */ 315 315 uint8_t tmp_buffer; 316 size_t bytes_transfer ed;316 size_t bytes_transferred; 317 317 rc = usb_request_get_descriptor(pipe, request_type, recipient, 318 318 descriptor_type, descriptor_index, language, 319 &tmp_buffer, sizeof(tmp_buffer), &bytes_transfer ed);320 if (rc != EOK) { 321 return rc; 322 } 323 if (bytes_transfer ed != 1) {319 &tmp_buffer, sizeof(tmp_buffer), &bytes_transferred); 320 if (rc != EOK) { 321 return rc; 322 } 323 if (bytes_transferred != 1) { 324 324 return ELIMIT; 325 325 } … … 340 340 rc = usb_request_get_descriptor(pipe, request_type, recipient, 341 341 descriptor_type, descriptor_index, language, 342 buffer, size, &bytes_transfer ed);342 buffer, size, &bytes_transferred); 343 343 if (rc != EOK) { 344 344 free(buffer); 345 345 return rc; 346 346 } 347 if (bytes_transfer ed != size) {347 if (bytes_transferred != size) { 348 348 free(buffer); 349 349 return ELIMIT; … … 475 475 errno_t usb_request_get_full_configuration_descriptor_alloc( 476 476 usb_pipe_t *pipe, int index, 477 void **descriptor_ptr, size_t *descriptor_size)477 const void **descriptor_ptr, size_t *descriptor_size) 478 478 { 479 479 errno_t rc; … … 824 824 * @return Error code. 825 825 */ 826 errno_t usb_request_clear_endpoint_halt(usb_pipe_t *pipe, uint16_t ep_index)826 static errno_t usb_request_clear_endpoint_halt(usb_pipe_t *pipe, uint16_t ep_index) 827 827 { 828 828 return usb_request_clear_feature(pipe, … … 843 843 return EINVAL; 844 844 } 845 return usb_request_clear_endpoint_halt(ctrl_pipe, 846 target_pipe->endpoint_no); 845 846 uint16_t index = target_pipe->desc.endpoint_no; 847 index |= (target_pipe->desc.direction == USB_DIRECTION_IN) << 7; 848 return usb_request_clear_endpoint_halt(ctrl_pipe, index); 847 849 } 848 850 … … 858 860 { 859 861 uint16_t status_tmp; 860 uint16_t pipe_index = (uint16_t) pipe-> endpoint_no;862 uint16_t pipe_index = (uint16_t) pipe->desc.endpoint_no; 861 863 errno_t rc = usb_request_get_status(ctrl_pipe, 862 864 USB_REQUEST_RECIPIENT_ENDPOINT, uint16_host2usb(pipe_index),
Note:
See TracChangeset
for help on using the changeset viewer.