Changeset d97d209 in mainline for uspace/lib/usbvirt/stdreq.c


Ignore:
Timestamp:
2010-10-10T22:01:32Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2c970ee
Parents:
0e41957
Message:

API change in virtual USB device

Instead of passing individual items of device request, the whole
structure is passed-in.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbvirt/stdreq.c

    r0e41957 rd97d209  
    8181}
    8282
    83 int handle_std_request(usb_direction_t direction, int recipient,
    84     uint16_t request, uint16_t value, uint16_t index, uint16_t length,
    85     uint8_t *remaining_data)
     83int handle_std_request(usb_device_request_setup_packet_t *request, uint8_t *data)
    8684{
    8785        int rc;
    8886       
    89         switch (request) {
     87        switch (request->request) {
    9088                case USB_DEVREQ_GET_DESCRIPTOR:
    91                         rc = handle_get_descriptor(value >> 8, (uint8_t) value,
    92                             index, length);
     89                        rc = handle_get_descriptor(
     90                            request->value_low, request->value_high,
     91                            request->index, request->length);
    9392                        break;
    9493               
    9594                case USB_DEVREQ_SET_ADDRESS:
    96                         rc = handle_set_address(value, index, length);
     95                        rc = handle_set_address(request->value,
     96                            request->index, request->length);
    9797                        break;
    9898               
     
    108108        if (rc == EFORWARD) {
    109109                if (DEVICE_HAS_OP(device, on_devreq_std)) {
    110                         return device->ops->on_devreq_std(device, direction,
    111                             recipient,
    112                             request, value, index,
    113                             length, remaining_data);
     110                        return device->ops->on_devreq_std(device,
     111                            request, data);
    114112                }
    115113        }
Note: See TracChangeset for help on using the changeset viewer.