Changes in uspace/lib/usb/include/usb/host/usb_endpoint_manager.h [f324635:ba038f4] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/include/usb/host/usb_endpoint_manager.h
rf324635 rba038f4 66 66 endpoint_t *ep, size_t data_size); 67 67 68 int usb_endpoint_manager_register_ep_wait(usb_endpoint_manager_t *instance, 69 usb_address_t address, usb_endpoint_t ep, usb_direction_t direction, 70 void *data, void (*data_remove_callback)(void* data, void* arg), void *arg, 71 size_t bw); 72 68 73 int usb_endpoint_manager_unregister_ep(usb_endpoint_manager_t *instance, 69 74 usb_address_t address, usb_endpoint_t ep, usb_direction_t direction); … … 75 80 void usb_endpoint_manager_reset_if_need( 76 81 usb_endpoint_manager_t *instance, usb_target_t target, const uint8_t *data); 77 78 static inline int usb_endpoint_manager_add_ep(usb_endpoint_manager_t *instance,79 usb_address_t address, usb_endpoint_t endpoint, usb_direction_t direction,80 usb_transfer_type_t type, usb_speed_t speed, size_t max_packet_size,81 size_t data_size)82 {83 endpoint_t *ep = malloc(sizeof(endpoint_t));84 if (ep == NULL)85 return ENOMEM;86 87 int ret = endpoint_init(ep, address, endpoint, direction, type, speed,88 max_packet_size);89 if (ret != EOK) {90 free(ep);91 return ret;92 }93 94 ret = usb_endpoint_manager_register_ep(instance, ep, data_size);95 if (ret != EOK) {96 endpoint_destroy(ep);97 return ret;98 }99 return EOK;100 }101 82 #endif 102 83 /**
Note:
See TracChangeset
for help on using the changeset viewer.