Changes in uspace/lib/usb/include/usb/host/batch.h [2cc6e97:cd1cec3b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/include/usb/host/batch.h
r2cc6e97 rcd1cec3b 43 43 typedef struct usb_transfer_batch usb_transfer_batch_t; 44 44 struct usb_transfer_batch { 45 endpoint_t *ep;46 45 link_t link; 46 usb_target_t target; 47 usb_transfer_type_t transfer_type; 48 usb_speed_t speed; 49 usb_direction_t direction; 47 50 usbhc_iface_transfer_in_callback_t callback_in; 48 51 usbhc_iface_transfer_out_callback_t callback_out; 49 void *arg;50 52 char *buffer; 51 char * data_buffer;53 char *transport_buffer; 52 54 size_t buffer_size; 53 55 char *setup_buffer; 54 56 size_t setup_size; 57 size_t max_packet_size; 55 58 size_t transfered_size; 56 59 void (*next_step)(usb_transfer_batch_t *); 57 60 int error; 58 61 ddf_fun_t *fun; 62 void *arg; 63 endpoint_t *ep; 59 64 void *private_data; 60 void (*private_data_dtor)(void *p_data);61 65 }; 62 66 63 67 void usb_transfer_batch_init( 64 68 usb_transfer_batch_t *instance, 65 endpoint_t *ep, 69 usb_target_t target, 70 usb_transfer_type_t transfer_type, 71 usb_speed_t speed, 72 size_t max_packet_size, 66 73 char *buffer, 67 char * data_buffer,74 char *transport_buffer, 68 75 size_t buffer_size, 69 76 char *setup_buffer, … … 73 80 void *arg, 74 81 ddf_fun_t *fun, 75 void *private_data,76 void (*private_data_dtor)(void *p_data)82 endpoint_t *ep, 83 void *private_data 77 84 ); 78 85 79 void usb_transfer_batch_call_in_and_dispose(usb_transfer_batch_t *instance); 80 void usb_transfer_batch_call_out_and_dispose(usb_transfer_batch_t *instance); 86 static inline usb_transfer_batch_t *usb_transfer_batch_from_link(link_t *l) 87 { 88 assert(l); 89 return list_get_instance(l, usb_transfer_batch_t, link); 90 } 91 92 void usb_transfer_batch_call_in(usb_transfer_batch_t *instance); 93 void usb_transfer_batch_call_out(usb_transfer_batch_t *instance); 81 94 void usb_transfer_batch_finish(usb_transfer_batch_t *instance); 82 void usb_transfer_batch_dispose(usb_transfer_batch_t *instance);83 95 84 96 static inline void usb_transfer_batch_finish_error( … … 90 102 } 91 103 92 static inline usb_transfer_batch_t *usb_transfer_batch_from_link(link_t *l)93 {94 assert(l);95 return list_get_instance(l, usb_transfer_batch_t, link);96 }97 98 104 #endif 99 105 /**
Note:
See TracChangeset
for help on using the changeset viewer.