Changeset aa9a53d in mainline for uspace/lib/usbvirt/src/ipc.c
- Timestamp:
- 2011-04-28T12:47:28Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e31b5c1
- Parents:
- 6fd7062
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbvirt/src/ipc.c
r6fd7062 raa9a53d 160 160 usb_transfer_type_t transfer_type = IPC_GET_ARG2(*icall); 161 161 162 usb_log_debug("ipc_interrupt_in(.%d, %s)\n",163 endpoint, usb_str_transfer_type_short(transfer_type));164 165 162 int rc; 166 163 … … 198 195 ipc_callid_t iid, ipc_call_t *icall) 199 196 { 200 printf("ipc_interrupt_out()\n"); 201 async_answer_0(iid, ENOTSUP); 197 usb_endpoint_t endpoint = IPC_GET_ARG1(*icall); 198 usb_transfer_type_t transfer_type = IPC_GET_ARG2(*icall); 199 200 void *data_buffer = NULL; 201 size_t data_buffer_size = 0; 202 203 int rc = async_data_write_accept(&data_buffer, false, 204 1, 1024, 0, &data_buffer_size); 205 if (rc != EOK) { 206 async_answer_0(iid, rc); 207 return; 208 } 209 210 rc = usbvirt_data_out(dev, transfer_type, endpoint, 211 data_buffer, data_buffer_size); 212 213 async_answer_0(iid, rc); 214 215 free(data_buffer); 202 216 } 203 217 … … 417 431 usb_transfer_type_t tr_type, void *data, size_t data_size) 418 432 { 419 return ENOTSUP; 433 aid_t opening_request = async_send_2(phone, 434 IPC_M_USBVIRT_INTERRUPT_OUT, ep, tr_type, NULL); 435 if (opening_request == 0) { 436 return ENOMEM; 437 } 438 439 int rc = async_data_write_start(phone, 440 data, data_size); 441 if (rc != EOK) { 442 async_wait_for(opening_request, NULL); 443 return rc; 444 } 445 446 sysarg_t opening_request_rc; 447 async_wait_for(opening_request, &opening_request_rc); 448 449 return (int) opening_request_rc; 420 450 } 421 451
Note:
See TracChangeset
for help on using the changeset viewer.