Changeset 8870230 in mainline
- Timestamp:
- 2011-04-01T15:57:34Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 857edac
- Parents:
- da9ebca
- Location:
- uspace
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/iface.c
rda9ebca r8870230 128 128 } 129 129 /*----------------------------------------------------------------------------*/ 130 static int register_endpoint( 131 ddf_fun_t *fun, usb_address_t address, usb_endpoint_t endpoint, 132 usb_transfer_type_t transfer_type, usb_direction_t direction, 133 size_t max_packet_size, unsigned int interval) 134 { 135 return ENOTSUP; 136 } 137 /*----------------------------------------------------------------------------*/ 138 static int unregister_endpoint( 139 ddf_fun_t *fun, usb_address_t address, 140 usb_endpoint_t endpoint, usb_direction_t direction) 141 { 142 return ENOTSUP; 143 } 144 /*----------------------------------------------------------------------------*/ 130 145 /** Interrupt out transaction interface function 131 146 * … … 365 380 .release_address = release_address, 366 381 382 .register_endpoint = register_endpoint, 383 .unregister_endpoint = unregister_endpoint, 384 367 385 .interrupt_out = interrupt_out, 368 386 .interrupt_in = interrupt_in, -
uspace/lib/usb/include/usb/host/bandwidth.h
rda9ebca r8870230 55 55 56 56 int bandwidth_reserve(bandwidth_t *instance, usb_address_t address, 57 usb_endpoint_t endpoint, usb_transfer_type_t transfer_type, 58 size_t max_packet_size, size_t size, unsigned interval); 57 usb_endpoint_t endpoint, usb_direction_t direction, usb_speed_t speed, 58 usb_transfer_type_t transfer_type, size_t max_packet_size, size_t size, 59 unsigned interval); 59 60 60 61 int bandwidth_release(bandwidth_t *instance, usb_address_t address, 61 usb_endpoint_t endpoint, usb_transfer_type_t transfer_type, 62 size_t max_packet_size, size_t size, unsigned interval); 62 usb_endpoint_t endpoint, usb_direction_t direction); 63 63 64 64 int bandwidth_use(bandwidth_t *instance, usb_address_t address, 65 usb_endpoint_t endpoint, usb_transfer_type_t transfer_type, 66 size_t max_packet_size, size_t size, unsigned interval); 65 usb_endpoint_t endpoint, usb_direction_t direction); 67 66 68 67 int bandwidth_free(bandwidth_t *instance, usb_address_t address, 69 usb_endpoint_t endpoint, usb_transfer_type_t transfer_type, 70 size_t max_packet_size, size_t size, unsigned interval); 68 usb_endpoint_t endpoint, usb_direction_t direction); 71 69 72 70 #endif -
uspace/lib/usb/src/host/bandwidth.c
rda9ebca r8870230 34 34 usb_address_t address; 35 35 usb_endpoint_t endpoint; 36 usb_transfer_type_t transfer_type; 37 size_t max_packet_size; 38 size_t size; 36 usb_direction_t direction; 39 37 } __attribute__((aligned (sizeof(unsigned long)))) transfer_t; 40 38 /*----------------------------------------------------------------------------*/ … … 43 41 link_t link; 44 42 bool used; 43 size_t required; 45 44 } transfer_status_t; 46 45 /*----------------------------------------------------------------------------*/ … … 91 90 /*----------------------------------------------------------------------------*/ 92 91 int bandwidth_reserve(bandwidth_t *instance, usb_address_t address, 93 usb_endpoint_t endpoint, usb_transfer_type_t transfer_type, 94 size_t max_packet_size, size_t size, unsigned interval) 95 { 96 assert(instance); 97 transfer_t trans = { 98 .address = address, 99 .endpoint = endpoint, 100 .transfer_type = transfer_type, 101 .max_packet_size = max_packet_size, 102 .size = size, 92 usb_endpoint_t endpoint, usb_direction_t direction, usb_speed_t speed, 93 usb_transfer_type_t transfer_type, size_t max_packet_size, size_t size, 94 unsigned interval) 95 { 96 assert(instance); 97 transfer_t trans = { 98 .address = address, 99 .endpoint = endpoint, 100 .direction = direction, 103 101 }; 104 102 fibril_mutex_lock(&instance->guard); … … 117 115 118 116 status->transfer = trans; 117 status->required = 0; 119 118 status->used = false; 120 119 link_initialize(&status->link); … … 128 127 /*----------------------------------------------------------------------------*/ 129 128 int bandwidth_release(bandwidth_t *instance, usb_address_t address, 130 usb_endpoint_t endpoint, usb_transfer_type_t transfer_type, 131 size_t max_packet_size, size_t size, unsigned interval) 132 { 133 assert(instance); 134 transfer_t trans = { 135 .address = address, 136 .endpoint = endpoint, 137 .transfer_type = transfer_type, 138 .max_packet_size = max_packet_size, 139 .size = size, 129 usb_endpoint_t endpoint, usb_direction_t direction) 130 { 131 assert(instance); 132 transfer_t trans = { 133 .address = address, 134 .endpoint = endpoint, 135 .direction = direction, 140 136 }; 141 137 fibril_mutex_lock(&instance->guard); … … 156 152 /*----------------------------------------------------------------------------*/ 157 153 int bandwidth_use(bandwidth_t *instance, usb_address_t address, 158 usb_endpoint_t endpoint, usb_transfer_type_t transfer_type, 159 size_t max_packet_size, size_t size, unsigned interval) 160 { 161 assert(instance); 162 transfer_t trans = { 163 .address = address, 164 .endpoint = endpoint, 165 .transfer_type = transfer_type, 166 .max_packet_size = max_packet_size, 167 .size = size, 154 usb_endpoint_t endpoint, usb_direction_t direction) 155 { 156 assert(instance); 157 transfer_t trans = { 158 .address = address, 159 .endpoint = endpoint, 160 .direction = direction, 168 161 }; 169 162 fibril_mutex_lock(&instance->guard); … … 187 180 /*----------------------------------------------------------------------------*/ 188 181 int bandwidth_free(bandwidth_t *instance, usb_address_t address, 189 usb_endpoint_t endpoint, usb_transfer_type_t transfer_type, 190 size_t max_packet_size, size_t size, unsigned interval) 191 { 192 assert(instance); 193 transfer_t trans = { 194 .address = address, 195 .endpoint = endpoint, 196 .transfer_type = transfer_type, 197 .max_packet_size = max_packet_size, 198 .size = size, 182 usb_endpoint_t endpoint, usb_direction_t direction) 183 { 184 assert(instance); 185 transfer_t trans = { 186 .address = address, 187 .endpoint = endpoint, 188 .direction = direction, 199 189 }; 200 190 fibril_mutex_lock(&instance->guard);
Note:
See TracChangeset
for help on using the changeset viewer.