Changeset d714945 in mainline


Ignore:
Timestamp:
2011-02-15T19:54:53Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e40b9f00
Parents:
c5d61ae6
Message:

Add special init for device on default address

Location:
uspace/lib/usb
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/include/usb/pipes.h

    rc5d61ae6 rd714945  
    3131 */
    3232/** @file
    33  * Communication between device drivers and host controller driver.
     33 * USB pipes representation.
    3434 */
    3535#ifndef LIBUSB_PIPES_H_
     
    3838#include <sys/types.h>
    3939#include <usb/usb.h>
     40#include <usb/usbdevice.h>
    4041#include <usb/descriptor.h>
    4142#include <ipc/devman.h>
     
    114115} usb_endpoint_mapping_t;
    115116
     117int usb_device_connection_initialize_on_default_address(
     118    usb_device_connection_t *, usb_hc_connection_t *);
    116119int usb_device_connection_initialize_from_device(usb_device_connection_t *,
    117120    device_t *);
  • uspace/lib/usb/src/pipes.c

    rc5d61ae6 rd714945  
    102102}
    103103
     104/** Initialize connection to USB device on default address.
     105 *
     106 * @param dev_connection Device connection structure to be initialized.
     107 * @param hc_connection Initialized connection to host controller.
     108 * @return Error code.
     109 */
     110int usb_device_connection_initialize_on_default_address(
     111    usb_device_connection_t *dev_connection,
     112    usb_hc_connection_t *hc_connection)
     113{
     114        assert(dev_connection);
     115
     116        if (hc_connection == NULL) {
     117                return EBADMEM;
     118        }
     119
     120        return usb_device_connection_initialize(dev_connection,
     121            hc_connection->hc_handle, (usb_address_t) 0);
     122}
     123
    104124
    105125/** Start a session on the endpoint pipe.
Note: See TracChangeset for help on using the changeset viewer.