Changeset 816f5f4 in mainline for uspace/lib/usbdev/src/devpoll.c


Ignore:
Timestamp:
2017-10-15T16:55:48Z (7 years ago)
Author:
Michal Staruch <salmelu@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9b2f69e
Parents:
2770b66
Message:

Remote USB (async) sending structures

remote_usb_register_endpoint is now sending a whole new structure, instead of 5 numeric arguments pulled out of structure.
This allows future extensibility for the structure as well as a working code to be used for other remote async calls.

File:
1 edited

Legend:

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

    r2770b66 r816f5f4  
    9696                    (int) mapping->interface->interface_subclass,
    9797                    (int) mapping->interface->interface_protocol,
    98                     data->request_size, pipe->max_packet_size);
     98                    data->request_size, pipe->desc.max_packet_size);
    9999        }
    100100
     
    128128                        usb_request_clear_endpoint_halt(
    129129                            usb_device_get_default_pipe(data->dev),
    130                             pipe->endpoint_no);
     130                            pipe->desc.endpoint_no);
    131131                }
    132132
     
    156156
    157157                /* Take a rest before next request. */
    158                
     158
    159159                // FIXME TODO: This is broken, the time is in ms not us.
    160160                // but first we need to fix drivers to actually stop using this,
     
    216216        if (request_size == 0)
    217217                return EINVAL;
    218        
    219         if (!epm || (epm->pipe.transfer_type != USB_TRANSFER_INTERRUPT) ||
    220             (epm->pipe.direction != USB_DIRECTION_IN))
     218
     219        if (!epm || (epm->pipe.desc.transfer_type != USB_TRANSFER_INTERRUPT) ||
     220            (epm->pipe.desc.direction != USB_DIRECTION_IN))
    221221                return EINVAL;
    222        
     222
    223223
    224224        polling_data_t *polling_data = malloc(sizeof(polling_data_t));
Note: See TracChangeset for help on using the changeset viewer.