Changeset 90dd59d in mainline for uspace/drv/bus/usb/ohci/batch.c
- Timestamp:
- 2011-08-25T13:04:59Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 23b0fe8
- Parents:
- 4f0e510
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/batch.c
r4f0e510 r90dd59d 43 43 #include "hw_struct/endpoint_descriptor.h" 44 44 #include "hw_struct/transfer_descriptor.h" 45 /* 46 static void batch_control_write(usb_transfer_batch_t *instance); 47 static void batch_control_read(usb_transfer_batch_t *instance); 48 49 static void batch_interrupt_in(usb_transfer_batch_t *instance); 50 static void batch_interrupt_out(usb_transfer_batch_t *instance); 51 52 static void batch_bulk_in(usb_transfer_batch_t *instance); 53 static void batch_bulk_out(usb_transfer_batch_t *instance); 54 */ 55 static void batch_setup_control(usb_transfer_batch_t *batch) 56 { 57 // TODO Find a better way to do this 58 if (batch->setup_buffer[0] & (1 << 7)) 59 batch_control_read(batch); 60 else 61 batch_control_write(batch); 62 } 63 64 void (*batch_setup[4][3])(usb_transfer_batch_t*) = 65 { 66 { NULL, NULL, batch_setup_control }, 67 { NULL, NULL, NULL }, 68 { batch_bulk_in, batch_bulk_out, NULL }, 69 { batch_interrupt_in, batch_interrupt_out, NULL }, 70 }; 71 45 72 46 73 /** OHCI specific data required for USB transfer */ … … 140 167 batch->data_buffer = data->device_buffer + batch->setup_size; 141 168 } 169 170 assert(batch_setup[batch->ep->transfer_type][batch->ep->direction]); 171 batch_setup[batch->ep->transfer_type][batch->ep->direction](batch); 142 172 143 173 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.