Ignore:
File:
1 edited

Legend:

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

    r095bddfc r3238506  
    143143         */
    144144
    145         const usb_device_request_setup_packet_t setup_packet = {
    146                 .request_type = SETUP_REQUEST_TYPE_DEVICE_TO_HOST
    147                     | (request_type << 5) | recipient,
    148                 .request = request,
    149                 .value = value,
    150                 .index = index,
    151                 .length = (uint16_t) data_size,
    152         };
    153 
    154         return usb_pipe_control_read(pipe, &setup_packet, sizeof(setup_packet),
     145        usb_device_request_setup_packet_t setup_packet;
     146        setup_packet.request_type = 128 | (request_type << 5) | recipient;
     147        setup_packet.request = request;
     148        setup_packet.value = value;
     149        setup_packet.index = index;
     150        setup_packet.length = (uint16_t) data_size;
     151
     152        int rc = usb_pipe_control_read(pipe,
     153            &setup_packet, sizeof(setup_packet),
    155154            data, data_size, actual_data_size);
     155
     156        return rc;
    156157}
    157158
     
    275276        }
    276277
    277         const uint16_t wValue = descriptor_index | (descriptor_type << 8);
     278        uint16_t wValue = descriptor_index | (descriptor_type << 8);
    278279
    279280        return usb_control_request_get(pipe,
Note: See TracChangeset for help on using the changeset viewer.