Changeset b8b1e631 in mainline for uspace/lib/usbdev/src/request.c


Ignore:
Timestamp:
2011-12-03T11:10:06Z (12 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
30413b31
Parents:
07fd4cd1 (diff), 1f5c9c96 (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.
Message:

Merge with mainline

File:
1 edited

Legend:

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

    r07fd4cd1 rb8b1e631  
    143143         */
    144144
    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),
     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),
    154155            data, data_size, actual_data_size);
    155 
    156         return rc;
    157156}
    158157
     
    276275        }
    277276
    278         uint16_t wValue = descriptor_index | (descriptor_type << 8);
     277        const uint16_t wValue = descriptor_index | (descriptor_type << 8);
    279278
    280279        return usb_control_request_get(pipe,
Note: See TracChangeset for help on using the changeset viewer.