Changeset 5400606 in mainline for uspace/lib/usbhost/include/usb/host/usb_endpoint_manager.h
- Timestamp:
- 2011-10-29T13:35:40Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4dfc905
- Parents:
- 2fd1f0c6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/include/usb/host/usb_endpoint_manager.h
r2fd1f0c6 r5400606 46 46 #include <usb/host/endpoint.h> 47 47 48 #define BANDWIDTH_TOTAL_USB11 12000000 48 /** Bytes per second in FULL SPEED */ 49 #define BANDWIDTH_TOTAL_USB11 (12000000 / 8) 50 /** 90% of total bandwidth is available for periodic transfers */ 49 51 #define BANDWIDTH_AVAILABLE_USB11 ((BANDWIDTH_TOTAL_USB11 / 10) * 9) 52 /** 16 addresses per list */ 50 53 #define ENDPOINT_LIST_COUNT 8 51 54 55 /** Endpoint management structure */ 52 56 typedef struct usb_endpoint_manager { 57 /** Store endpoint_t instances */ 53 58 list_t endpoint_lists[ENDPOINT_LIST_COUNT]; 59 /** Prevents races accessing lists */ 54 60 fibril_mutex_t guard; 61 /** Size of the bandwidth pool */ 55 62 size_t free_bw; 63 /** Use this function to count bw required by EP */ 56 64 size_t (*bw_count)(usb_speed_t, usb_transfer_type_t, size_t, size_t); 57 65 } usb_endpoint_manager_t; … … 64 72 size_t (*bw_count)(usb_speed_t, usb_transfer_type_t, size_t, size_t)); 65 73 66 void usb_endpoint_manager_reset_eps_if_need( 67 usb_ endpoint_manager_t *instance, usb_target_t target, const uint8_t *data);74 void usb_endpoint_manager_reset_eps_if_need(usb_endpoint_manager_t *instance, 75 usb_target_t target, const uint8_t data[8]); 68 76 69 77 int usb_endpoint_manager_register_ep(
Note:
See TracChangeset
for help on using the changeset viewer.