Changes in uspace/lib/usbhost/include/usb/host/endpoint.h [3e6a98c5:58563585] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/include/usb/host/endpoint.h
r3e6a98c5 r58563585 40 40 #include <fibril_synch.h> 41 41 #include <usb/usb.h> 42 #include <atomic.h> 42 43 43 44 /** Host controller side endpoint structure. */ 44 45 typedef struct endpoint { 46 /** Reference count. */ 47 atomic_t refcnt; 45 48 /** Part of linked list. */ 46 49 link_t link; … … 57 60 /** Maximum size of data packets. */ 58 61 size_t max_packet_size; 62 /** Additional opportunities per uframe */ 63 unsigned packets; 59 64 /** Necessary bandwidth. */ 60 65 size_t bandwidth; … … 67 72 /** Signals change of active status. */ 68 73 fibril_condvar_t avail; 74 /** High speed TT data */ 75 struct { 76 usb_address_t address; 77 unsigned port; 78 } tt; 69 79 /** Optional device specific data. */ 70 80 struct { … … 78 88 } endpoint_t; 79 89 80 e ndpoint_t * endpoint_create(usb_address_t address, usb_endpoint_t endpoint,81 usb_direction_t direction, usb_transfer_type_t type, usb_speed_t speed,82 size_t max_packet_size, size_t bw);83 void endpoint_destroy(endpoint_t *instance);90 extern endpoint_t *endpoint_create(usb_address_t, usb_endpoint_t, 91 usb_direction_t, usb_transfer_type_t, usb_speed_t, size_t, unsigned int, 92 size_t, usb_address_t, unsigned int); 93 extern void endpoint_destroy(endpoint_t *); 84 94 85 void endpoint_set_hc_data(endpoint_t *instance, 86 void *data, int (*toggle_get)(void *), void (*toggle_set)(void *, int)); 87 void endpoint_clear_hc_data(endpoint_t *instance); 95 extern void endpoint_add_ref(endpoint_t *); 96 extern void endpoint_del_ref(endpoint_t *); 88 97 89 void endpoint_use(endpoint_t *instance); 90 void endpoint_release(endpoint_t *instance); 98 extern void endpoint_set_hc_data(endpoint_t *, void *, int (*)(void *), 99 void (*)(void *, int)); 100 extern void endpoint_clear_hc_data(endpoint_t *); 91 101 92 int endpoint_toggle_get(endpoint_t *instance); 93 void endpoint_toggle_set(endpoint_t *instance, int toggle); 102 extern void endpoint_use(endpoint_t *); 103 extern void endpoint_release(endpoint_t *); 104 105 extern int endpoint_toggle_get(endpoint_t *); 106 extern void endpoint_toggle_set(endpoint_t *, int); 94 107 95 108 /** list_get_instance wrapper. 109 * 96 110 * @param item Pointer to link member. 111 * 97 112 * @return Pointer to endpoint_t structure. 113 * 98 114 */ 99 115 static inline endpoint_t * endpoint_get_instance(link_t *item) … … 102 118 } 103 119 #endif 120 104 121 /** 105 122 * @}
Note:
See TracChangeset
for help on using the changeset viewer.