Changes in uspace/lib/usbdev/src/request.c [5a6cc679:33b8d024] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/src/request.c
r5a6cc679 r33b8d024 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 red data120 * @param actual_data_size Actual size of transfered data 121 121 * (in native endianness). 122 122 * … … 183 183 184 184 uint16_t status_usb_endianess; 185 size_t data_transfer red_size;185 size_t data_transfered_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 red_size);189 if (rc != EOK) { 190 return rc; 191 } 192 if (data_transfer red_size != 2) {188 &status_usb_endianess, 2, &data_transfered_size); 189 if (rc != EOK) { 190 return rc; 191 } 192 if (data_transfered_size != 2) { 193 193 return ELIMIT; 194 194 } … … 314 314 */ 315 315 uint8_t tmp_buffer; 316 size_t bytes_transfer red;316 size_t bytes_transfered; 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 red);320 if (rc != EOK) { 321 return rc; 322 } 323 if (bytes_transfer red != 1) {319 &tmp_buffer, sizeof(tmp_buffer), &bytes_transfered); 320 if (rc != EOK) { 321 return rc; 322 } 323 if (bytes_transfered != 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 red);342 buffer, size, &bytes_transfered); 343 343 if (rc != EOK) { 344 344 free(buffer); 345 345 return rc; 346 346 } 347 if (bytes_transfer red != size) {347 if (bytes_transfered != 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 constvoid **descriptor_ptr, size_t *descriptor_size)477 void **descriptor_ptr, size_t *descriptor_size) 478 478 { 479 479 errno_t rc; … … 824 824 * @return Error code. 825 825 */ 826 staticerrno_t usb_request_clear_endpoint_halt(usb_pipe_t *pipe, uint16_t ep_index)826 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 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); 845 return usb_request_clear_endpoint_halt(ctrl_pipe, 846 target_pipe->endpoint_no); 849 847 } 850 848 … … 860 858 { 861 859 uint16_t status_tmp; 862 uint16_t pipe_index = (uint16_t) pipe-> desc.endpoint_no;860 uint16_t pipe_index = (uint16_t) pipe->endpoint_no; 863 861 errno_t rc = usb_request_get_status(ctrl_pipe, 864 862 USB_REQUEST_RECIPIENT_ENDPOINT, uint16_host2usb(pipe_index),
Note:
See TracChangeset
for help on using the changeset viewer.