Changeset aa81adc in mainline for uspace/lib/usbhost/include/usb/host
- Timestamp:
- 2011-07-11T09:28:00Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ece7f78
- Parents:
- 1cb4f05
- Location:
- uspace/lib/usbhost/include/usb/host
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/include/usb/host/endpoint.h
r1cb4f05 raa81adc 61 61 } endpoint_t; 62 62 63 int endpoint_init(endpoint_t *instance, usb_address_t address,64 usb_ endpoint_t endpoint, usb_direction_t direction,65 usb_transfer_type_t type, usb_speed_t speed,size_t max_packet_size);63 endpoint_t * endpoint_get(usb_address_t address, usb_endpoint_t endpoint, 64 usb_direction_t direction, usb_transfer_type_t type, usb_speed_t speed, 65 size_t max_packet_size); 66 66 67 67 void endpoint_destroy(endpoint_t *instance); -
uspace/lib/usbhost/include/usb/host/usb_endpoint_manager.h
r1cb4f05 raa81adc 82 82 size_t data_size) 83 83 { 84 endpoint_t *ep = malloc(sizeof(endpoint_t)); 85 if (ep == NULL) 84 endpoint_t *ep = endpoint_get( 85 address, endpoint, direction, type, speed, max_packet_size); 86 if (!ep) 86 87 return ENOMEM; 87 88 88 int ret = endpoint_init(ep, address, endpoint, direction, type, speed, 89 max_packet_size); 90 if (ret != EOK) { 91 free(ep); 92 return ret; 93 } 94 95 ret = usb_endpoint_manager_register_ep(instance, ep, data_size); 89 const int ret = 90 usb_endpoint_manager_register_ep(instance, ep, data_size); 96 91 if (ret != EOK) { 97 92 endpoint_destroy(ep); 98 return ret;99 93 } 100 return EOK;94 return ret; 101 95 } 102 96 #endif
Note:
See TracChangeset
for help on using the changeset viewer.