Changeset f29931c in mainline for uspace/lib/usbhost/include/usb/host/usb_endpoint_manager.h
- Timestamp:
- 2012-12-16T14:53:34Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4daee7a
- Parents:
- 2f87aa6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/include/usb/host/usb_endpoint_manager.h
r2f87aa6 rf29931c 53 53 #define ENDPOINT_LIST_COUNT 8 54 54 55 typedef size_t (*bw_count_func_t)(usb_speed_t, usb_transfer_type_t, size_t, size_t); 56 typedef void (*ep_remove_callback_t)(endpoint_t *, void *); 57 typedef int (*ep_add_callback_t)(endpoint_t *, void *); 58 55 59 /** Endpoint management structure */ 56 60 typedef struct usb_endpoint_manager { … … 62 66 size_t free_bw; 63 67 /** Use this function to count bw required by EP */ 64 size_t (*bw_count)(usb_speed_t, usb_transfer_type_t, size_t, size_t);68 bw_count_func_t bw_count; 65 69 } usb_endpoint_manager_t; 70 66 71 67 72 size_t bandwidth_count_usb11(usb_speed_t speed, usb_transfer_type_t type, … … 69 74 70 75 int usb_endpoint_manager_init(usb_endpoint_manager_t *instance, 71 size_t available_bandwidth, 72 size_t (*bw_count)(usb_speed_t, usb_transfer_type_t, size_t, size_t)); 76 size_t available_bandwidth, bw_count_func_t bw_count); 73 77 74 78 void usb_endpoint_manager_reset_eps_if_need(usb_endpoint_manager_t *instance, … … 85 89 usb_address_t address, usb_endpoint_t endpoint, usb_direction_t direction, 86 90 usb_transfer_type_t type, usb_speed_t speed, size_t max_packet_size, 87 size_t data_size, int (*callback)(endpoint_t *, void *), void *arg);91 size_t data_size, ep_add_callback_t callback, void *arg); 88 92 89 93 int usb_endpoint_manager_remove_ep(usb_endpoint_manager_t *instance, 90 94 usb_address_t address, usb_endpoint_t endpoint, usb_direction_t direction, 91 void (*callback)(endpoint_t *, void *), void *arg);95 ep_remove_callback_t callback, void *arg); 92 96 93 97 void usb_endpoint_manager_remove_address(usb_endpoint_manager_t *instance, 94 usb_address_t address, void (*callback)(endpoint_t *, void *), void *arg);98 usb_address_t address, ep_remove_callback_t callback, void *arg); 95 99 #endif 96 100 /**
Note:
See TracChangeset
for help on using the changeset viewer.