Changeset d8cdf39e in mainline
- Timestamp:
- 2012-12-22T23:34:36Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- db8b7ca
- Parents:
- 3c4663e
- Location:
- uspace/lib/usbhost
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/include/usb/host/hcd.h
r3c4663e rd8cdf39e 87 87 usbhc_iface_transfer_out_callback_t out, void *arg, const char* name); 88 88 89 /** Data retrieve wrapper.90 * @param fun ddf function, non-null.91 * @return pointer cast to hcd_t*.92 */93 static inline hcd_t *fun_to_hcd(ddf_fun_t *fun)94 {95 return ddf_fun_data_get(fun);96 }97 98 99 89 #endif 100 101 90 /** 102 91 * @} -
uspace/lib/usbhost/src/iface.c
r3c4663e rd8cdf39e 40 40 #include <usb/host/endpoint.h> 41 41 #include <usb/host/hcd.h> 42 #include "ddf_helpers.h" 42 43 43 44 /** Calls ep_add_hook upon endpoint registration. … … 97 98 { 98 99 assert(fun); 99 hcd_t *hcd = fun_to_hcd(fun);100 hcd_t *hcd = dev_to_hcd(ddf_fun_get_dev(fun)); 100 101 assert(hcd); 101 102 assert(address); … … 118 119 { 119 120 assert(fun); 120 hcd_t *hcd = fun_to_hcd(fun);121 hcd_t *hcd = dev_to_hcd(ddf_fun_get_dev(fun)); 121 122 assert(hcd); 122 123 … … 137 138 { 138 139 assert(fun); 139 hcd_t *hcd = fun_to_hcd(fun);140 hcd_t *hcd = dev_to_hcd(ddf_fun_get_dev(fun)); 140 141 assert(hcd); 141 142 return usb_device_manager_get_info_by_address( … … 152 153 { 153 154 assert(fun); 154 hcd_t *hcd = fun_to_hcd(fun);155 hcd_t *hcd = dev_to_hcd(ddf_fun_get_dev(fun)); 155 156 assert(hcd); 156 157 usb_log_debug("Address release %d.\n", address); … … 177 178 { 178 179 assert(fun); 179 hcd_t *hcd = fun_to_hcd(fun);180 hcd_t *hcd = dev_to_hcd(ddf_fun_get_dev(fun)); 180 181 assert(hcd); 181 182 const size_t size = max_packet_size; … … 209 210 { 210 211 assert(fun); 211 hcd_t *hcd = fun_to_hcd(fun);212 hcd_t *hcd = dev_to_hcd(ddf_fun_get_dev(fun)); 212 213 assert(hcd); 213 214 usb_log_debug("Unregister endpoint %d:%d %s.\n", … … 231 232 void *arg) 232 233 { 233 return hcd_send_batch( fun_to_hcd(fun), target, USB_DIRECTION_IN,234 return hcd_send_batch(dev_to_hcd(ddf_fun_get_dev(fun)), target, USB_DIRECTION_IN, 234 235 data, size, setup_data, callback, NULL, arg, "READ"); 235 236 } … … 249 250 usbhc_iface_transfer_out_callback_t callback, void *arg) 250 251 { 251 return hcd_send_batch(fun_to_hcd(fun), target, USB_DIRECTION_OUT, 252 (uint8_t*)data, size, setup_data, NULL, callback, arg, "WRITE"); 252 return hcd_send_batch(dev_to_hcd(ddf_fun_get_dev(fun)), 253 target, USB_DIRECTION_OUT, (uint8_t*)data, size, setup_data, NULL, 254 callback, arg, "WRITE"); 253 255 } 254 256
Note:
See TracChangeset
for help on using the changeset viewer.