Changeset 933b0d7 in mainline for uspace/lib/usbhost/src/usb_endpoint_manager.c
- Timestamp:
- 2011-09-07T11:38:57Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d394f1b8
- Parents:
- 7099861
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/src/usb_endpoint_manager.c
r7099861 r933b0d7 140 140 /*----------------------------------------------------------------------------*/ 141 141 int usb_endpoint_manager_init(usb_endpoint_manager_t *instance, 142 size_t available_bandwidth) 142 size_t available_bandwidth, 143 size_t (*bw_count)(usb_speed_t, usb_transfer_type_t, size_t, size_t)) 143 144 { 144 145 assert(instance); 145 146 fibril_mutex_initialize(&instance->guard); 146 147 instance->free_bw = available_bandwidth; 148 instance->bw_count = bw_count; 147 149 const bool ht = 148 150 hash_table_create(&instance->ep_table, BUCKET_COUNT, MAX_KEYS, &op); … … 158 160 endpoint_t *ep, size_t data_size) 159 161 { 162 assert(instance); 163 assert(instance->bw_count); 160 164 assert(ep); 161 const size_t bw = bandwidth_count_usb11(ep->speed, ep->transfer_type,165 const size_t bw = instance->bw_count(ep->speed, ep->transfer_type, 162 166 data_size, ep->max_packet_size); 163 assert(instance);164 167 165 168 fibril_mutex_lock(&instance->guard);
Note:
See TracChangeset
for help on using the changeset viewer.