Changeset 17412546 in mainline for uspace/lib/usbhost/include/usb/host/endpoint.h
- Timestamp:
- 2011-10-29T20:17:51Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c44a5f1
- Parents:
- 549ff23
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/include/usb/host/endpoint.h
r549ff23 r17412546 41 41 #include <usb/usb.h> 42 42 43 /** Host controller side endpoint structure. */ 43 44 typedef struct endpoint { 45 /** Part of linked list. */ 44 46 link_t link; 47 /** USB address. */ 45 48 usb_address_t address; 49 /** USB endpoint number. */ 46 50 usb_endpoint_t endpoint; 51 /** Communication direction. */ 47 52 usb_direction_t direction; 53 /** USB transfer type. */ 48 54 usb_transfer_type_t transfer_type; 55 /** Communication speed. */ 49 56 usb_speed_t speed; 57 /** Maximum size of data packets. */ 50 58 size_t max_packet_size; 59 /** Necessary bandwidth. */ 51 60 size_t bandwidth; 61 /** Value of the toggle bit. */ 52 62 unsigned toggle:1; 63 /** True if there is a batch using this scheduled for this endpoint. */ 64 volatile bool active; 65 /** Protects resources and active status changes. */ 53 66 fibril_mutex_t guard; 67 /** Signals change of active status. */ 54 68 fibril_condvar_t avail; 55 volatile bool active;69 /** Optional device specific data. */ 56 70 struct { 71 /** Device specific data. */ 57 72 void *data; 73 /** Callback to get the value of toggle bit. */ 58 74 int (*toggle_get)(void *); 75 /** Callback to set the value of toggle bit. */ 59 76 void (*toggle_set)(void *, int); 60 77 } hc_data; … … 76 93 void endpoint_toggle_set(endpoint_t *instance, int toggle); 77 94 95 /** list_get_instance wrapper. 96 * @param item Pointer to link member. 97 * @return Pointer to enpoint_t structure. 98 */ 78 99 static inline endpoint_t * endpoint_get_instance(link_t *item) 79 100 {
Note:
See TracChangeset
for help on using the changeset viewer.