Changeset db7ed07 in mainline
- Timestamp:
- 2011-01-28T11:45:40Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c13ecfe
- Parents:
- 7fc092a
- Location:
- uspace/drv/uhci
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci/callback.c
r7fc092a rdb7ed07 1 1 #include <errno.h> 2 #include <mem.h> 2 3 3 4 #include "callback.h" … … 26 27 return EOK; 27 28 } 29 /*----------------------------------------------------------------------------*/ 30 void callback_run( 31 callback_t *instance, usb_transaction_outcome_t outcome, size_t act_size) 32 { 33 assert(instance); 34 35 /* update the old buffer */ 36 if (instance->new_buffer) { 37 memcpy(instance->new_buffer, instance->old_buffer, instance->buffer_size); 38 trans_free(instance->new_buffer); 39 instance->new_buffer = NULL; 40 } 41 42 if (instance->callback_in) { 43 assert(instance->callback_out == NULL); 44 instance->callback_in( 45 instance->dev, act_size, outcome, instance->arg); 46 } 47 } -
uspace/drv/uhci/callback.h
r7fc092a rdb7ed07 35 35 #define DRV_UHCI_CALLBACK_H 36 36 37 #include <mem.h>38 37 #include <usbhc_iface.h> 38 #include <usb/usb.h> 39 39 40 40 #include "debug.h" … … 49 49 void *arg; 50 50 size_t buffer_size; 51 size_t actual_size; 51 52 device_t *dev; 52 53 } callback_t; … … 69 70 trans_free(instance->new_buffer); 70 71 } 72 73 void callback_run( 74 callback_t *instance, usb_transaction_outcome_t outcome, size_t act_size); 71 75 #endif 72 76 /**
Note:
See TracChangeset
for help on using the changeset viewer.