Changeset a6a9910 in mainline
- Timestamp:
- 2012-12-22T23:13:05Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1affef2f
- Parents:
- 52f9c57
- Location:
- uspace/lib/usbhost
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/include/usb/host/usb_endpoint_manager.h
r52f9c57 ra6a9910 95 95 ep_remove_callback_t callback, void *arg); 96 96 97 int usb_endpoint_manager_reset_toggle(usb_endpoint_manager_t *instance, 98 usb_target_t target, bool all); 99 97 100 void usb_endpoint_manager_remove_address(usb_endpoint_manager_t *instance, 98 101 usb_address_t address, ep_remove_callback_t callback, void *arg); -
uspace/lib/usbhost/src/usb_endpoint_manager.c
r52f9c57 ra6a9910 395 395 } 396 396 397 int usb_endpoint_manager_reset_toggle(usb_endpoint_manager_t *instance, 398 usb_target_t target, bool all) 399 { 400 assert(instance); 401 if (!usb_target_is_valid(target)) { 402 return EINVAL; 403 } 404 405 int rc = ENOENT; 406 407 fibril_mutex_lock(&instance->guard); 408 list_foreach(*get_list(instance, target.address), it) { 409 endpoint_t *ep = endpoint_get_instance(it); 410 if ((ep->address == target.address) 411 && (all || ep->endpoint == target.endpoint)) { 412 endpoint_toggle_set(ep, 0); 413 rc = EOK; 414 } 415 } 416 fibril_mutex_unlock(&instance->guard); 417 return rc; 418 } 419 397 420 /** Unregister and destroy all endpoints using given address. 398 421 * @param instance usb_endpoint_manager structure, non-null.
Note:
See TracChangeset
for help on using the changeset viewer.