Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 2c202c5 in mainline for uspace/lib/usb/src/dev.c


Ignore:
Timestamp:
2011-12-11T15:17:43Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
bd575647
Parents:
a045ab1
Message:

libusb: Add device_connection_t.

File:
1 edited

Legend:

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

    ra045ab1 r2c202c5  
    6868 * @return Error code.
    6969 */
    70 int usb_find_hc(devman_handle_t device_handle, devman_handle_t *hc_handle)
     70int usb_get_hc_by_handle(devman_handle_t device_handle,
     71    devman_handle_t *hc_handle)
    7172{
    7273        async_sess_t *parent_sess =
     
    8889        return ret;
    8990}
     91/*----------------------------------------------------------------------------*/
     92int usb_device_connection_initialize(usb_device_connection_t *connection,
     93    usb_hc_connection_t *hc_connection, usb_address_t address)
     94{
     95        assert(connection);
     96
     97        if (hc_connection == NULL) {
     98                return EBADMEM;
     99        }
     100
     101        if ((address < 0) || (address >= USB11_ADDRESS_MAX)) {
     102                return EINVAL;
     103        }
     104
     105        connection->hc_connection = hc_connection;
     106        connection->address = address;
     107        return EOK;
     108}
Note: See TracChangeset for help on using the changeset viewer.