Changeset 36bcf84f in mainline for uspace/lib/usb/src


Ignore:
Timestamp:
2010-11-28T18:03:19Z (15 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
78f01ff9
Parents:
ef75332 (diff), 710f518 (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 vojtechhorky/

Location:
uspace/lib/usb/src
Files:
1 added
4 edited

Legend:

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

    ref75332 r36bcf84f  
    205205}
    206206
     207/** Tell USB address of given device.
     208 *
     209 * @param handle Devman handle of the device.
     210 * @return USB device address or error code.
     211 */
     212usb_address_t usb_get_address_by_handle(devman_handle_t handle)
     213{
     214        /* TODO: search list of attached devices. */
     215        return ENOENT;
     216}
     217
    207218/**
    208219 * @}
  • uspace/lib/usb/src/hcdhubd_private.h

    ref75332 r36bcf84f  
    4242extern usb_hc_driver_t *hc_driver;
    4343
     44extern usbhc_iface_t usbhc_interface;
     45
     46usb_address_t usb_get_address_by_handle(devman_handle_t);
    4447int usb_add_hc_device(device_t *);
    4548int usb_add_hub_device(device_t *);
  • uspace/lib/usb/src/hcdrv.c

    ref75332 r36bcf84f  
    5050usb_hc_driver_t *hc_driver = NULL;
    5151
    52 static usbhc_iface_t usb_interface = {
    53         .interrupt_out = NULL,
    54         .interrupt_in = NULL
    55 };
    56 
    5752static device_ops_t usb_device_ops = {
    58         .interfaces[USBHC_DEV_IFACE] = &usb_interface
     53        .interfaces[USBHC_DEV_IFACE] = &usbhc_interface
    5954};
    6055
  • uspace/lib/usb/src/usbdrv.c

    ref75332 r36bcf84f  
    345345}
    346346
     347/** Start control write transfer. */
     348int usb_drv_async_control_write_setup(int phone, usb_target_t target,
     349    void *buffer, size_t size,
     350    usb_handle_t *handle)
     351{
     352        return async_send_buffer(phone,
     353            IPC_M_USBHC_CONTROL_WRITE_SETUP,
     354            target,
     355            buffer, size,
     356            handle);
     357}
     358
     359/** Send data during control write transfer. */
     360int usb_drv_async_control_write_data(int phone, usb_target_t target,
     361    void *buffer, size_t size,
     362    usb_handle_t *handle)
     363{
     364        return async_send_buffer(phone,
     365            IPC_M_USBHC_CONTROL_WRITE_DATA,
     366            target,
     367            buffer, size,
     368            handle);
     369}
     370
     371/** Finalize control write transfer. */
     372int usb_drv_async_control_write_status(int phone, usb_target_t target,
     373    usb_handle_t *handle)
     374{
     375        return async_recv_buffer(phone,
     376            IPC_M_USBHC_CONTROL_WRITE_STATUS,
     377            target,
     378            NULL, 0, NULL,
     379            handle);
     380}
     381
     382/** Start control read transfer. */
     383int usb_drv_async_control_read_setup(int phone, usb_target_t target,
     384    void *buffer, size_t size,
     385    usb_handle_t *handle)
     386{
     387        return async_send_buffer(phone,
     388            IPC_M_USBHC_CONTROL_READ_SETUP,
     389            target,
     390            buffer, size,
     391            handle);
     392}
     393
     394/** Read data during control read transfer. */
     395int usb_drv_async_control_read_data(int phone, usb_target_t target,
     396    void *buffer, size_t size, size_t *actual_size,
     397    usb_handle_t *handle)
     398{
     399        return async_recv_buffer(phone,
     400            IPC_M_USBHC_CONTROL_READ_DATA,
     401            target,
     402            buffer, size, actual_size,
     403            handle);
     404}
     405
     406/** Finalize control read transfer. */
     407int usb_drv_async_control_read_status(int phone, usb_target_t target,
     408    usb_handle_t *handle)
     409{
     410        return async_send_buffer(phone,
     411            IPC_M_USBHC_CONTROL_READ_STATUS,
     412            target,
     413            NULL, 0,
     414            handle);
     415}
     416
    347417/**
    348418 * @}
Note: See TracChangeset for help on using the changeset viewer.