Changeset d15809b4 in mainline for uspace/drv/uhci-hcd/batch.h
- Timestamp:
- 2011-02-14T10:14:31Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 962ce100
- Parents:
- 0d36c20 (diff), 45c01a1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/batch.h
r0d36c20 rd15809b4 32 32 * @brief UHCI driver 33 33 */ 34 #ifndef DRV_UHCI_ TRACKER_H35 #define DRV_UHCI_ TRACKER_H34 #ifndef DRV_UHCI_BATCH_H 35 #define DRV_UHCI_BATCH_H 36 36 37 37 #include <adt/list.h> … … 41 41 42 42 #include "uhci_struct/transfer_descriptor.h" 43 #include "uhci_struct/queue_head.h" 43 44 44 45 typedef enum { … … 47 48 } dev_speed_t; 48 49 49 typedef struct tracker50 typedef struct batch 50 51 { 51 52 link_t link; 53 dev_speed_t speed; 52 54 usb_target_t target; 53 55 usb_transfer_type_t transfer_type; … … 57 59 }; 58 60 void *arg; 61 char *transport_buffer; 62 char *setup_buffer; 63 size_t setup_size; 59 64 char *buffer; 60 char *packet;61 65 size_t buffer_size; 62 66 size_t max_packet_size; 63 size_t packet _size;64 size_t buffer_offset;65 dev_speed_t speed;67 size_t packets; 68 size_t transfered_size; 69 int error; 66 70 device_t *dev; 67 transfer_descriptor_t *td;68 void (*next_step)(struct tracker*);69 unsigned toggle:1;70 } tracker_t;71 queue_head_t *qh; 72 transfer_descriptor_t *tds; 73 void (*next_step)(struct batch*); 74 } batch_t; 71 75 72 73 tracker_t * tracker_get(device_t *dev, usb_target_t target, 76 batch_t * batch_get(device_t *dev, usb_target_t target, 74 77 usb_transfer_type_t transfer_type, size_t max_packet_size, 75 78 dev_speed_t speed, char *buffer, size_t size, 79 char *setup_buffer, size_t setup_size, 76 80 usbhc_iface_transfer_in_callback_t func_in, 77 81 usbhc_iface_transfer_out_callback_t func_out, void *arg); 78 82 79 void tracker_control_write( 80 tracker_t *instance, char* setup_buffer, size_t setup_size); 83 bool batch_is_complete(batch_t *instance); 81 84 82 void tracker_control_read( 83 tracker_t *instance, char* setup_buffer, size_t setup_size); 85 void batch_control_write(batch_t *instance); 84 86 85 void tracker_interrupt_in(tracker_t *instance);87 void batch_control_read(batch_t *instance); 86 88 87 void tracker_interrupt_out(tracker_t *instance); 89 void batch_interrupt_in(batch_t *instance); 90 91 void batch_interrupt_out(batch_t *instance); 88 92 89 93 /* DEPRECATED FUNCTIONS NEEDED BY THE OLD API */ 90 void tracker_control_setup_old(tracker_t *instance);94 void batch_control_setup_old(batch_t *instance); 91 95 92 void tracker_control_write_data_old(tracker_t *instance);96 void batch_control_write_data_old(batch_t *instance); 93 97 94 void tracker_control_read_data_old(tracker_t *instance);98 void batch_control_read_data_old(batch_t *instance); 95 99 96 void tracker_control_write_status_old(tracker_t *instance);100 void batch_control_write_status_old(batch_t *instance); 97 101 98 void tracker_control_read_status_old(tracker_t *instance);102 void batch_control_read_status_old(batch_t *instance); 99 103 #endif 100 104 /**
Note:
See TracChangeset
for help on using the changeset viewer.