Changeset 7265558 in mainline for uspace/lib/usbhost/include/usb
- Timestamp:
- 2011-10-28T20:53:41Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 48ae3ef
- Parents:
- 83c3123
- Location:
- uspace/lib/usbhost/include/usb/host
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/include/usb/host/endpoint.h
r83c3123 r7265558 77 77 int endpoint_toggle_get(endpoint_t *instance); 78 78 void endpoint_toggle_set(endpoint_t *instance, int toggle); 79 void endpoint_toggle_reset_filtered(endpoint_t *instance, usb_target_t target); 79 80 static inline endpoint_t * endpoint_get_instance(link_t *item) 81 { 82 return list_get_instance(item, endpoint_t, link); 83 } 80 84 #endif 81 85 /** -
uspace/lib/usbhost/include/usb/host/hcd.h
r83c3123 r7265558 37 37 38 38 #include <assert.h> 39 #include <usbhc_iface.h> 39 40 #include <usb/host/usb_device_manager.h> 40 41 #include <usb/host/usb_endpoint_manager.h> 41 42 #include <usb/host/usb_transfer_batch.h> 42 #include <usbhc_iface.h>43 43 44 44 typedef struct hcd hcd_t; … … 53 53 }; 54 54 /*----------------------------------------------------------------------------*/ 55 static inline inthcd_init(hcd_t *hcd, size_t bandwidth,55 static inline void hcd_init(hcd_t *hcd, size_t bandwidth, 56 56 size_t (*bw_count)(usb_speed_t, usb_transfer_type_t, size_t, size_t)) 57 57 { 58 58 assert(hcd); 59 59 usb_device_manager_init(&hcd->dev_manager); 60 return usb_endpoint_manager_init(&hcd->ep_manager, bandwidth, bw_count); 61 } 62 /*----------------------------------------------------------------------------*/ 63 static inline void hcd_destroy(hcd_t *hcd) 64 { 65 usb_endpoint_manager_destroy(&hcd->ep_manager); 60 usb_endpoint_manager_init(&hcd->ep_manager, bandwidth, bw_count); 66 61 } 67 62 /*----------------------------------------------------------------------------*/ -
uspace/lib/usbhost/include/usb/host/usb_endpoint_manager.h
r83c3123 r7265558 40 40 #define LIBUSBHOST_HOST_USB_ENDPOINT_MANAGER_H 41 41 42 #include <stdlib.h> 43 #include <adt/hash_table.h> 42 #include <adt/list.h> 44 43 #include <fibril_synch.h> 45 44 #include <usb/usb.h> 45 46 46 #include <usb/host/endpoint.h> 47 47 48 48 #define BANDWIDTH_TOTAL_USB11 12000000 49 49 #define BANDWIDTH_AVAILABLE_USB11 ((BANDWIDTH_TOTAL_USB11 / 10) * 9) 50 #define ENDPOINT_LIST_COUNT 8 50 51 51 52 typedef struct usb_endpoint_manager { 52 hash_table_t ep_table;53 list_t endpoint_lists[ENDPOINT_LIST_COUNT]; 53 54 fibril_mutex_t guard; 54 55 size_t free_bw;
Note:
See TracChangeset
for help on using the changeset viewer.