Changeset 1387692 in mainline for uspace/drv/uhci-hcd/batch.c
- Timestamp:
- 2011-03-21T15:01:52Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c92c13f
- Parents:
- e34e77a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/batch.c
re34e77a r1387692 53 53 } uhci_batch_t; 54 54 55 static void batch_control( batch_t *instance,55 static void batch_control(usb_transfer_batch_t *instance, 56 56 usb_packet_id data_stage, usb_packet_id status_stage); 57 static void batch_data( batch_t *instance, usb_packet_id pid);58 static void batch_call_in_and_dispose( batch_t *instance);59 static void batch_call_out_and_dispose( batch_t *instance);57 static void batch_data(usb_transfer_batch_t *instance, usb_packet_id pid); 58 static void batch_call_in_and_dispose(usb_transfer_batch_t *instance); 59 static void batch_call_out_and_dispose(usb_transfer_batch_t *instance); 60 60 61 61 … … 82 82 * transaction and callback. 83 83 */ 84 batch_t * batch_get(ddf_fun_t *fun, usb_target_t target,84 usb_transfer_batch_t * batch_get(ddf_fun_t *fun, usb_target_t target, 85 85 usb_transfer_type_t transfer_type, size_t max_packet_size, 86 86 usb_speed_t speed, char *buffer, size_t buffer_size, … … 103 103 } else (void)0 104 104 105 batch_t *instance = malloc(sizeof(batch_t));105 usb_transfer_batch_t *instance = malloc(sizeof(usb_transfer_batch_t)); 106 106 CHECK_NULL_DISPOSE_RETURN(instance, 107 107 "Failed to allocate batch instance.\n"); 108 batch_init(instance, target, transfer_type, speed, max_packet_size,108 usb_transfer_batch_init(instance, target, transfer_type, speed, max_packet_size, 109 109 buffer, NULL, buffer_size, NULL, setup_size, func_in, 110 110 func_out, arg, fun, NULL); … … 161 161 * is reached. 162 162 */ 163 bool batch_is_complete( batch_t *instance)163 bool batch_is_complete(usb_transfer_batch_t *instance) 164 164 { 165 165 assert(instance); … … 205 205 * Uses genercir control function with pids OUT and IN. 206 206 */ 207 void batch_control_write( batch_t *instance)207 void batch_control_write(usb_transfer_batch_t *instance) 208 208 { 209 209 assert(instance); … … 222 222 * Uses generic control with pids IN and OUT. 223 223 */ 224 void batch_control_read( batch_t *instance)224 void batch_control_read(usb_transfer_batch_t *instance) 225 225 { 226 226 assert(instance); … … 236 236 * Data transaction with PID_IN. 237 237 */ 238 void batch_interrupt_in( batch_t *instance)238 void batch_interrupt_in(usb_transfer_batch_t *instance) 239 239 { 240 240 assert(instance); … … 251 251 * Data transaction with PID_OUT. 252 252 */ 253 void batch_interrupt_out( batch_t *instance)253 void batch_interrupt_out(usb_transfer_batch_t *instance) 254 254 { 255 255 assert(instance); … … 269 269 * Data transaction with PID_IN. 270 270 */ 271 void batch_bulk_in( batch_t *instance)271 void batch_bulk_in(usb_transfer_batch_t *instance) 272 272 { 273 273 assert(instance); … … 284 284 * Data transaction with PID_OUT. 285 285 */ 286 void batch_bulk_out( batch_t *instance)286 void batch_bulk_out(usb_transfer_batch_t *instance) 287 287 { 288 288 assert(instance); … … 304 304 * The last packet is marked with IOC flag. 305 305 */ 306 void batch_data( batch_t *instance, usb_packet_id pid)306 void batch_data(usb_transfer_batch_t *instance, usb_packet_id pid) 307 307 { 308 308 assert(instance); … … 358 358 * The last packet is marked with IOC. 359 359 */ 360 void batch_control( batch_t *instance,360 void batch_control(usb_transfer_batch_t *instance, 361 361 usb_packet_id data_stage, usb_packet_id status_stage) 362 362 { … … 411 411 } 412 412 /*----------------------------------------------------------------------------*/ 413 qh_t * batch_qh( batch_t *instance)413 qh_t * batch_qh(usb_transfer_batch_t *instance) 414 414 { 415 415 assert(instance); … … 423 423 * @param[in] instance Batch structure to use. 424 424 */ 425 void batch_call_in_and_dispose( batch_t *instance)426 { 427 assert(instance); 428 batch_call_in(instance);425 void batch_call_in_and_dispose(usb_transfer_batch_t *instance) 426 { 427 assert(instance); 428 usb_transfer_batch_call_in(instance); 429 429 batch_dispose(instance); 430 430 } … … 434 434 * @param[in] instance Batch structure to use. 435 435 */ 436 void batch_call_out_and_dispose( batch_t *instance)437 { 438 assert(instance); 439 batch_call_out(instance);436 void batch_call_out_and_dispose(usb_transfer_batch_t *instance) 437 { 438 assert(instance); 439 usb_transfer_batch_call_out(instance); 440 440 batch_dispose(instance); 441 441 } … … 445 445 * @param[in] instance Batch structure to use. 446 446 */ 447 void batch_dispose( batch_t *instance)447 void batch_dispose(usb_transfer_batch_t *instance) 448 448 { 449 449 assert(instance);
Note:
See TracChangeset
for help on using the changeset viewer.