Changeset 03ffb69 in mainline
- Timestamp:
- 2011-12-12T12:59:47Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6a21877
- Parents:
- d02834c
- Location:
- uspace/lib/usbdev
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/include/usb/dev/pipes.h
rd02834c r03ffb69 116 116 117 117 118 int usb_device_get_assigned_interface(const ddf_dev_t *);119 120 118 int usb_pipe_initialize(usb_pipe_t *, usb_device_connection_t *, 121 119 usb_endpoint_t, usb_transfer_type_t, size_t, usb_direction_t); -
uspace/lib/usbdev/src/pipes.c
rd02834c r03ffb69 33 33 * USB endpoint pipes miscellaneous functions. 34 34 */ 35 #include <usb_iface.h>36 35 #include <usb/dev/pipes.h> 37 36 #include <usb/dev/request.h> … … 39 38 #include <assert.h> 40 39 41 /** Tell USB interface assigned to given device.42 *43 * @param device Device in question.44 * @return Error code (ENOTSUP means any).45 */46 int usb_device_get_assigned_interface(const ddf_dev_t *device)47 {48 assert(device);49 async_sess_t *parent_sess =50 devman_parent_device_connect(EXCHANGE_ATOMIC, device->handle,51 IPC_FLAG_BLOCKING);52 if (!parent_sess)53 return ENOMEM;54 55 async_exch_t *exch = async_exchange_begin(parent_sess);56 if (!exch) {57 async_hangup(parent_sess);58 return ENOMEM;59 }60 61 int iface_no;62 const int ret = usb_get_my_interface(exch, &iface_no);63 64 return ret == EOK ? iface_no : ret;65 }66 /*----------------------------------------------------------------------------*/67 40 /** Prepare pipe for a long transfer. 68 41 *
Note:
See TracChangeset
for help on using the changeset viewer.