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


Ignore:
Timestamp:
2018-01-20T03:02:36Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
60d3f35
Parents:
3cdaa7f
git-author:
Ondřej Hlavatý <aearsis@…> (2018-01-20 03:02:32)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-01-20 03:02:36)
Message:

libdrv: usb iface callbacks joined

In addition to handle and current interface, it is good for the device
to know its address and speed. Also, it is expected to add some other
fields (stats, info tied to devices of specific speed and so on) in the
future. Instead of adding yet another call, join those two and let HC
fill a description structure.

File:
1 edited

Legend:

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

    r3cdaa7f rc280d7e  
    4040#include "ddf/driver.h"
    4141#include <async.h>
     42#include <usbhc_iface.h>
    4243
    4344typedef async_sess_t usb_dev_session_t;
     45
     46typedef struct {
     47        usb_address_t address;
     48        usb_speed_t speed;
     49        devman_handle_t handle;
     50        int iface;
     51} usb_device_desc_t;
    4452
    4553extern usb_dev_session_t *usb_dev_connect(devman_handle_t);
     
    4755extern void usb_dev_disconnect(usb_dev_session_t *);
    4856
    49 extern int usb_get_my_interface(async_exch_t *, int *);
    50 extern int usb_get_my_device_handle(async_exch_t *, devman_handle_t *);
     57extern int usb_get_my_description(async_exch_t *, usb_device_desc_t *);
    5158
    5259/** USB device communication interface. */
    5360typedef struct {
    54         int (*get_my_interface)(ddf_fun_t *, int *);
    55         int (*get_my_device_handle)(ddf_fun_t *, devman_handle_t *);
     61        int (*get_my_description)(ddf_fun_t *, usb_device_desc_t *);
    5662} usb_iface_t;
    5763
Note: See TracChangeset for help on using the changeset viewer.