Changeset 17873ac7 in mainline for uspace/lib/usbhost/include/usb/host/endpoint.h
- Timestamp:
- 2017-10-31T19:06:57Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 479e32d
- Parents:
- a312d8f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/include/usb/host/endpoint.h
ra312d8f r17873ac7 52 52 /** Host controller side endpoint structure. */ 53 53 typedef struct endpoint { 54 /** Part of linked list. */ 55 link_t link; 54 56 /** Managing bus */ 55 57 bus_t *bus; 56 58 /** Reference count. */ 57 59 atomic_t refcnt; 58 /** Part of linked list. */59 link_t link;60 60 /** USB device */ 61 61 device_t *device; … … 76 76 /** Value of the toggle bit. */ 77 77 unsigned toggle:1; 78 /** T rue if there is a batch using this scheduled for this endpoint. */79 bool active;78 /** The currently active transfer batch. Write using methods, read under guard. */ 79 usb_transfer_batch_t *active_batch; 80 80 /** Protects resources and active status changes. */ 81 81 fibril_mutex_t guard; … … 91 91 extern void endpoint_del_ref(endpoint_t *); 92 92 93 extern void endpoint_use(endpoint_t *); 94 extern void endpoint_release(endpoint_t *); 93 /* Pay atention to synchronization of batch access wrt to aborting & finishing from another fibril. */ 94 95 /* Set currently active batch. The common case is to activate in the same 96 * critical section as scheduling to HW. 97 */ 98 extern void endpoint_activate_locked(endpoint_t *, usb_transfer_batch_t *); 99 100 /* Deactivate the endpoint, allowing others to activate it again. Batch shall 101 * already have an error set. */ 102 extern void endpoint_deactivate_locked(endpoint_t *); 103 104 /* Abort the currenty active batch. */ 105 void endpoint_abort(endpoint_t *); 95 106 96 107 extern int endpoint_toggle_get(endpoint_t *); 97 extern void endpoint_toggle_set(endpoint_t *, unsigned);108 extern void endpoint_toggle_set(endpoint_t *, bool); 98 109 99 110 /** list_get_instance wrapper.
Note:
See TracChangeset
for help on using the changeset viewer.