Changeset df8f3fa in mainline
- Timestamp:
- 2011-08-24T13:32:47Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5fe0a69
- Parents:
- 31bc40e
- Location:
- uspace/lib/usbhost
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/include/usb/host/hcd.h
r31bc40e rdf8f3fa 41 41 #include <usb/host/batch.h> 42 42 #include <usbhc_iface.h> 43 //#include <driver.h>44 43 45 44 typedef struct hcd hcd_t; … … 54 53 void (*batch_private_dtor)(void *); 55 54 }; 56 55 /*----------------------------------------------------------------------------*/ 57 56 static inline int hcd_init(hcd_t *hcd, size_t bandwidth) 58 57 { … … 61 60 return usb_endpoint_manager_init(&hcd->ep_manager, bandwidth); 62 61 } 63 62 /*----------------------------------------------------------------------------*/ 63 static inline void reset_ep_if_need( 64 hcd_t *hcd, usb_target_t target, const char* setup_data) 65 { 66 assert(hcd); 67 usb_endpoint_manager_reset_if_need( 68 &hcd->ep_manager, target, (const uint8_t *)setup_data); 69 } 70 /*----------------------------------------------------------------------------*/ 64 71 static inline hcd_t * fun_to_hcd(ddf_fun_t *fun) 65 72 { … … 67 74 return fun->driver_data; 68 75 } 69 76 /*----------------------------------------------------------------------------*/ 70 77 extern usbhc_iface_t hcd_iface; 71 78 -
uspace/lib/usbhost/src/batch.c
r31bc40e rdf8f3fa 38 38 #include <usb/debug.h> 39 39 #include <usb/host/batch.h> 40 #include <usb/host/hcd.h> 40 41 41 42 void usb_transfer_batch_call_in(usb_transfer_batch_t *instance); … … 150 151 str_error(instance->error)); 151 152 153 if (instance->ep->transfer_type == USB_TRANSFER_CONTROL 154 && instance->error == EOK) { 155 usb_target_t target = 156 {instance->ep->address, instance->ep->endpoint}; 157 reset_ep_if_need( 158 fun_to_hcd(instance->fun), target, instance->setup_buffer); 159 } 160 152 161 instance->callback_out(instance->fun, 153 162 instance->error, instance->arg); -
uspace/lib/usbhost/src/iface.c
r31bc40e rdf8f3fa 117 117 assert(address); 118 118 119 usb_log_debug("Address request with speed %d.\n", speed);119 usb_log_debug("Address request speed: %s.\n", usb_str_speed(speed)); 120 120 *address = device_keeper_get_free_address(&hcd->dev_manager, speed); 121 121 usb_log_debug("Address request with result: %d.\n", *address); … … 191 191 usb_device_keeper_get_speed(&hcd->dev_manager, address); 192 192 if (speed >= USB_SPEED_MAX) { 193 // Does this happen? 193 194 speed = ep_speed; 194 195 } … … 306 307 return send_batch(fun, target, USB_DIRECTION_BOTH, data, size, 307 308 setup_data, setup_size, NULL, callback, arg, "Control WRITE"); 308 // usb_endpoint_manager_reset_if_need(&hc->ep_manager, target, setup_data);309 309 } 310 310 /*----------------------------------------------------------------------------*/
Note:
See TracChangeset
for help on using the changeset viewer.