Changeset 787421c in mainline


Ignore:
Timestamp:
2011-02-01T23:24:50Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
abe8ac5
Parents:
2a11192
Message:

Refactoring of usb_request_get_descriptor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/src/request.c

    r2a11192 r787421c  
    224224        }
    225225
    226         PREPARE_SETUP_PACKET_LOHI(setup_packet, USB_DIRECTION_IN,
     226        uint16_t wValue = descriptor_index | (descriptor_type << 8);
     227
     228        return usb_control_request_get(pipe,
    227229            request_type, USB_REQUEST_RECIPIENT_DEVICE,
    228             USB_DEVREQ_GET_DESCRIPTOR, descriptor_index, descriptor_type,
    229             language, size);
    230 
    231         int rc = usb_endpoint_pipe_control_read(pipe,
    232             &setup_packet, sizeof(setup_packet),
     230            USB_DEVREQ_GET_DESCRIPTOR,
     231            wValue, language,
    233232            buffer, size, actual_size);
    234 
    235         return rc;
    236233}
    237234
Note: See TracChangeset for help on using the changeset viewer.