Changeset 357a302 in mainline for uspace/lib/drv/generic/remote_usb.c
- Timestamp:
- 2011-02-20T14:17:40Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b68b279
- Parents:
- 3ae93a8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/remote_usb.c
r3ae93a8 r357a302 41 41 42 42 static void remote_usb_get_hc_handle(device_t *, void *, ipc_callid_t, ipc_call_t *); 43 static void remote_usb_get_address(device_t *, void *, ipc_callid_t, ipc_call_t *); 43 44 //static void remote_usb(device_t *, void *, ipc_callid_t, ipc_call_t *); 44 45 45 46 /** Remote USB interface operations. */ 46 47 static remote_iface_func_ptr_t remote_usb_iface_ops [] = { 48 remote_usb_get_address, 47 49 remote_usb_get_hc_handle 48 50 }; … … 55 57 .methods = remote_usb_iface_ops 56 58 }; 59 60 61 void remote_usb_get_address(device_t *device, void *iface, 62 ipc_callid_t callid, ipc_call_t *call) 63 { 64 usb_iface_t *usb_iface = (usb_iface_t *) iface; 65 66 if (usb_iface->get_address == NULL) { 67 async_answer_0(callid, ENOTSUP); 68 return; 69 } 70 71 devman_handle_t handle = DEV_IPC_GET_ARG1(*call); 72 73 usb_address_t address; 74 int rc = usb_iface->get_address(device, handle, &address); 75 if (rc != EOK) { 76 async_answer_0(callid, rc); 77 } else { 78 async_answer_1(callid, EOK, address); 79 } 80 } 57 81 58 82
Note:
See TracChangeset
for help on using the changeset viewer.