Changeset 3822f7c9 in mainline
- Timestamp:
- 2011-09-13T12:00:16Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a837544
- Parents:
- a00ac07
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/src/iface.c
ra00ac07 r3822f7c9 41 41 static inline int send_batch( 42 42 ddf_fun_t *fun, usb_target_t target, usb_direction_t direction, 43 void *data, size_t size, void * setup_data, size_t setup_size,43 void *data, size_t size, void * setup_data, 44 44 usbhc_iface_transfer_in_callback_t in, 45 45 usbhc_iface_transfer_out_callback_t out, void *arg, const char* name) … … 236 236 { 237 237 return send_batch(fun, target, USB_DIRECTION_OUT, data, size, 238 NULL, 0,NULL, callback, arg, "Interrupt OUT");238 NULL, NULL, callback, arg, "Interrupt OUT"); 239 239 } 240 240 /*----------------------------------------------------------------------------*/ … … 254 254 { 255 255 return send_batch(fun, target, USB_DIRECTION_IN, data, size, 256 NULL, 0,callback, NULL, arg, "Interrupt IN");256 NULL, callback, NULL, arg, "Interrupt IN"); 257 257 } 258 258 /*----------------------------------------------------------------------------*/ … … 272 272 { 273 273 return send_batch(fun, target, USB_DIRECTION_OUT, data, size, 274 NULL, 0,NULL, callback, arg, "Bulk OUT");274 NULL, NULL, callback, arg, "Bulk OUT"); 275 275 } 276 276 /*----------------------------------------------------------------------------*/ … … 290 290 { 291 291 return send_batch(fun, target, USB_DIRECTION_IN, data, size, 292 NULL, 0,callback, NULL, arg, "Bulk IN");292 NULL, callback, NULL, arg, "Bulk IN"); 293 293 } 294 294 /*----------------------------------------------------------------------------*/ … … 311 311 { 312 312 return send_batch(fun, target, USB_DIRECTION_BOTH, data, size, 313 setup_data, setup_size,NULL, callback, arg, "Control WRITE");313 setup_data, NULL, callback, arg, "Control WRITE"); 314 314 } 315 315 /*----------------------------------------------------------------------------*/ … … 332 332 { 333 333 return send_batch(fun, target, USB_DIRECTION_BOTH, data, size, 334 setup_data, setup_size, callback, NULL, arg, "Control READ"); 334 setup_data, callback, NULL, arg, "Control READ"); 335 } 336 /*----------------------------------------------------------------------------*/ 337 static int usb_read(ddf_fun_t *fun, usb_target_t target, uint64_t setup_data, 338 uint8_t *data, size_t size, usbhc_iface_transfer_in_callback_t callback, 339 void *arg) 340 { 341 return send_batch(fun, target, USB_DIRECTION_IN, data, size, 342 &setup_data, callback, NULL, arg, "READ"); 343 } 344 /*----------------------------------------------------------------------------*/ 345 static int usb_write(ddf_fun_t *fun, usb_target_t target, uint64_t setup_data, 346 const uint8_t *data, size_t size, 347 usbhc_iface_transfer_out_callback_t callback, void *arg) 348 { 349 return send_batch(fun, target, USB_DIRECTION_OUT, (uint8_t*)data, size, 350 &setup_data, NULL, callback, arg, "WRITE"); 335 351 } 336 352 /*----------------------------------------------------------------------------*/ … … 352 368 .control_write = control_write, 353 369 .control_read = control_read, 370 371 .read = usb_read, 372 .write = usb_write, 354 373 }; 355 374 /**
Note:
See TracChangeset
for help on using the changeset viewer.