Changeset 57c8fc9 in mainline for uspace/lib/usbhost/src
- Timestamp:
- 2013-09-21T02:17:14Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c898236
- Parents:
- ce33c10
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/src/ddf_helpers.c
rce33c10 r57c8fc9 39 39 #include <usb/descriptor.h> 40 40 #include <usb/request.h> 41 #include <devman.h> 41 42 #include <errno.h> 42 43 #include <str_error.h> … … 640 641 ddf_fun_destroy(hc->ctl_fun); 641 642 } 643 644 645 //TODO: Move this to generic ddf? 646 /** Call the parent driver with a request to enable interrupts 647 * 648 * @param[in] device Device asking for interrupts 649 * @return Error code. 650 */ 651 int hcd_ddf_enable_interrupts(ddf_dev_t *device) 652 { 653 assert(device); 654 async_sess_t *parent_sess = 655 devman_parent_device_connect(EXCHANGE_SERIALIZE, 656 ddf_dev_get_handle(device), IPC_FLAG_BLOCKING); 657 const bool enabled = hw_res_enable_interrupt(parent_sess); 658 async_hangup(parent_sess); 659 660 return enabled ? EOK : EIO; 661 } 662 663 int hcd_ddf_get_registers(ddf_dev_t *device, hw_res_list_parsed_t *hw_res) 664 { 665 assert(device); 666 assert(hw_res); 667 668 async_sess_t *parent_sess = 669 devman_parent_device_connect(EXCHANGE_SERIALIZE, 670 ddf_dev_get_handle(device), IPC_FLAG_BLOCKING); 671 hw_res_list_parsed_init(hw_res); 672 const int ret = hw_res_get_list_parsed(parent_sess, hw_res, 0); 673 async_hangup(parent_sess); 674 return ret; 675 } 642 676 /** 643 677 * @}
Note:
See TracChangeset
for help on using the changeset viewer.