Changes in uspace/lib/usb/src/host/endpoint.c [8b4ce802:d32ed36] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/src/host/endpoint.c
r8b4ce802 rd32ed36 53 53 fibril_mutex_initialize(&instance->guard); 54 54 fibril_condvar_initialize(&instance->avail); 55 endpoint_clear_hc_data(instance);56 55 return EOK; 57 56 } … … 62 61 assert(!instance->active); 63 62 free(instance); 64 }65 /*----------------------------------------------------------------------------*/66 void endpoint_set_hc_data(endpoint_t *instance,67 void *data, int (*toggle_get)(void *), void (*toggle_set)(void *, int))68 {69 assert(instance);70 instance->hc_data.data = data;71 instance->hc_data.toggle_get = toggle_get;72 instance->hc_data.toggle_set = toggle_set;73 }74 /*----------------------------------------------------------------------------*/75 void endpoint_clear_hc_data(endpoint_t *instance)76 {77 assert(instance);78 instance->hc_data.data = NULL;79 instance->hc_data.toggle_get = NULL;80 instance->hc_data.toggle_set = NULL;81 63 } 82 64 /*----------------------------------------------------------------------------*/ … … 103 85 { 104 86 assert(instance); 105 if (instance->hc_data.toggle_get)106 instance->toggle =107 instance->hc_data.toggle_get(instance->hc_data.data);108 87 return (int)instance->toggle; 109 88 } … … 113 92 assert(instance); 114 93 assert(toggle == 0 || toggle == 1); 115 if (instance->hc_data.toggle_set)116 instance->hc_data.toggle_set(instance->hc_data.data, toggle);117 94 instance->toggle = toggle; 118 95 }
Note:
See TracChangeset
for help on using the changeset viewer.