Changeset 4689d40 in mainline
- Timestamp:
- 2010-12-04T17:51:07Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ce687bbe
- Parents:
- ad104e0
- Location:
- uspace/lib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/remote_usbhc.c
rad104e0 r4689d40 55 55 static void remote_usbhc_release_default_address(device_t *, void *, ipc_callid_t, ipc_call_t *); 56 56 static void remote_usbhc_request_address(device_t *, void *, ipc_callid_t, ipc_call_t *); 57 static void remote_usbhc_bind_address(device_t *, void *, ipc_callid_t, ipc_call_t *); 57 58 static void remote_usbhc_release_address(device_t *, void *, ipc_callid_t, ipc_call_t *); 58 59 //static void remote_usbhc(device_t *, void *, ipc_callid_t, ipc_call_t *); … … 68 69 69 70 remote_usbhc_request_address, 71 remote_usbhc_bind_address, 70 72 remote_usbhc_release_address, 71 73 … … 197 199 ipc_answer_1(callid, EOK, (ipcarg_t) address); 198 200 } 201 } 202 203 void remote_usbhc_bind_address(device_t *device, void *iface, 204 ipc_callid_t callid, ipc_call_t *call) 205 { 206 usbhc_iface_t *usb_iface = (usbhc_iface_t *) iface; 207 208 if (!usb_iface->bind_address) { 209 ipc_answer_0(callid, ENOTSUP); 210 return; 211 } 212 213 usb_address_t address = (usb_address_t) IPC_GET_ARG1(*call); 214 devman_handle_t handle = (devman_handle_t) IPC_GET_ARG2(*call); 215 216 int rc = usb_iface->bind_address(device, address, handle); 217 218 ipc_answer_0(callid, rc); 199 219 } 200 220 -
uspace/lib/drv/include/usbhc_iface.h
rad104e0 r4689d40 137 137 IPC_M_USBHC_REQUEST_ADDRESS, 138 138 139 /** Bind USB address with devman handle. 140 * Parameters: 141 * - USB address 142 * - devman handle 143 * Answer: 144 * - EOK - address binded 145 * - ENOENT - address is not in use 146 */ 147 IPC_M_USBHC_BIND_ADDRESS, 148 139 149 /** Release address in use. 140 150 * Arguments: … … 223 233 int (*release_default_address)(device_t *); 224 234 int (*request_address)(device_t *, usb_address_t *); 235 int (*bind_address)(device_t *, usb_address_t, devman_handle_t); 225 236 int (*release_address)(device_t *, usb_address_t); 226 237 -
uspace/lib/usb/include/usb/usbdrv.h
rad104e0 r4689d40 44 44 int usb_drv_release_default_address(int); 45 45 usb_address_t usb_drv_request_address(int); 46 int usb_drv_bind_address(int, usb_address_t, devman_handle_t); 46 47 int usb_drv_release_address(int, usb_address_t); 47 48 -
uspace/lib/usb/src/usbdrv.c
rad104e0 r4689d40 136 136 } 137 137 138 /** Inform HC about binding address with devman handle. 139 * 140 * @param phone Open phone to host controller driver. 141 * @param address Address to be binded. 142 * @param handle Devman handle of the device. 143 * @return Error code. 144 */ 145 int usb_drv_bind_address(int phone, usb_address_t address, 146 devman_handle_t handle) 147 { 148 int rc = async_req_2_0(phone, IPC_M_USBHC_BIND_ADDRESS, 149 address, handle); 150 151 return rc; 152 } 153 138 154 /** Inform HC about address release. 139 155 *
Note:
See TracChangeset
for help on using the changeset viewer.