Changeset 0918382f in mainline for uspace/lib/drv/include/usb_iface.h


Ignore:
Timestamp:
2013-08-07T15:00:36Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
14dd4c9
Parents:
2757247
Message:

usb: Switch to using port number as device identifier.

Port number info will be needed for HS SPLIT transactions. Moreover,
it can be used to produce predictable, persistent device names.

Switch port_number from size_t to unsigned. There are max 256 ports so
even short would be enough.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/include/usb_iface.h

    r2757247 r0918382f  
    4242#include <usb/usb.h>
    4343
    44 typedef intptr_t usb_device_handle_t;
    45 enum {
    46         USB_DEVICE_HANDLE_INVALID = -1
    47 };
    4844typedef async_sess_t usb_dev_session_t;
    4945
     
    5854int usb_release_default_address(async_exch_t *);
    5955
    60 int usb_device_enumerate(async_exch_t *, usb_device_handle_t *);
    61 int usb_device_remove(async_exch_t *, usb_device_handle_t);
     56int usb_device_enumerate(async_exch_t *, unsigned port);
     57int usb_device_remove(async_exch_t *, unsigned port);
    6258
    6359int usb_register_endpoint(async_exch_t *, usb_endpoint_t, usb_transfer_type_t,
     
    8177        int (*release_default_address)(ddf_fun_t *);
    8278
    83         int (*device_enumerate)(ddf_fun_t *, usb_device_handle_t *);
    84         int (*device_remove)(ddf_fun_t *, usb_device_handle_t);
     79        int (*device_enumerate)(ddf_fun_t *, unsigned);
     80        int (*device_remove)(ddf_fun_t *, unsigned);
    8581
    8682        int (*register_endpoint)(ddf_fun_t *, usb_endpoint_t,
Note: See TracChangeset for help on using the changeset viewer.