Changeset fd07e526 in mainline for uspace/lib/usbhost/include
- Timestamp:
- 2011-09-16T14:50:20Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/fix-logger-deadlock, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 432a269, d1e18573
- Parents:
- 47fecbb (diff), 82a31261 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- uspace/lib/usbhost/include/usb/host
- Files:
-
- 2 added
- 1 deleted
- 2 edited
- 1 moved
-
batch.h (deleted)
-
endpoint.h (modified) (2 diffs)
-
hcd.h (added)
-
usb_device_manager.h (moved) (moved from uspace/lib/usbhost/include/usb/host/device_keeper.h ) (4 diffs)
-
usb_endpoint_manager.h (modified) (4 diffs)
-
usb_transfer_batch.h (added)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/include/usb/host/endpoint.h
r47fecbb rfd07e526 54 54 fibril_condvar_t avail; 55 55 volatile bool active; 56 void (*destroy_hook)(struct endpoint *); 56 57 struct { 57 58 void *data; … … 68 69 69 70 void endpoint_set_hc_data(endpoint_t *instance, 70 void *data, int (*toggle_get)(void *), void (*toggle_set)(void *, int)); 71 void *data, void (*destroy_hook)(endpoint_t *), 72 int (*toggle_get)(void *), void (*toggle_set)(void *, int)); 71 73 72 74 void endpoint_clear_hc_data(endpoint_t *instance); -
uspace/lib/usbhost/include/usb/host/usb_device_manager.h
r47fecbb rfd07e526 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 29 28 /** @addtogroup libusbhost 30 29 * @{ 31 30 */ 32 31 /** @file 33 * Device keeper structure and functions.32 * Device manager structure and functions. 34 33 * 35 34 * Typical USB host controller needs to keep track of various settings for … … 38 37 * This structure shall simplify the management. 39 38 */ 40 #ifndef LIBUSBHOST_HOST_ DEVICE_KEEPER_H41 #define LIBUSBHOST_HOST_ DEVICE_KEEPER_H39 #ifndef LIBUSBHOST_HOST_USB_DEVICE_MANAGER_H 40 #define LIBUSBHOST_HOST_USB_DEVICE_MANAGER_H 42 41 43 42 #include <adt/list.h> … … 57 56 }; 58 57 59 /** Host controller device keeper.58 /** Host controller device manager. 60 59 * You shall not access members directly but only using functions below. 61 60 */ … … 64 63 fibril_mutex_t guard; 65 64 usb_address_t last_address; 66 } usb_device_ keeper_t;65 } usb_device_manager_t; 67 66 68 void usb_device_ keeper_init(usb_device_keeper_t *instance);67 void usb_device_manager_init(usb_device_manager_t *instance); 69 68 70 usb_address_t device_keeper_get_free_address(usb_device_keeper_t *instance,71 usb_ speed_t speed);69 usb_address_t usb_device_manager_get_free_address( 70 usb_device_manager_t *instance, usb_speed_t speed); 72 71 73 void usb_device_ keeper_bind(usb_device_keeper_t *instance,72 void usb_device_manager_bind(usb_device_manager_t *instance, 74 73 usb_address_t address, devman_handle_t handle); 75 74 76 void usb_device_ keeper_release(usb_device_keeper_t *instance,75 void usb_device_manager_release(usb_device_manager_t *instance, 77 76 usb_address_t address); 78 77 79 usb_address_t usb_device_ keeper_find(usb_device_keeper_t *instance,78 usb_address_t usb_device_manager_find(usb_device_manager_t *instance, 80 79 devman_handle_t handle); 81 80 82 bool usb_device_ keeper_find_by_address(usb_device_keeper_t *instance,81 bool usb_device_manager_find_by_address(usb_device_manager_t *instance, 83 82 usb_address_t address, devman_handle_t *handle); 84 83 85 usb_speed_t usb_device_ keeper_get_speed(usb_device_keeper_t *instance,84 usb_speed_t usb_device_manager_get_speed(usb_device_manager_t *instance, 86 85 usb_address_t address); 87 86 #endif -
uspace/lib/usbhost/include/usb/host/usb_endpoint_manager.h
r47fecbb rfd07e526 38 38 */ 39 39 #ifndef LIBUSBHOST_HOST_USB_ENDPOINT_MANAGER_H 40 #define LIBUSBHOST_HOST_ YSB_ENDPOINT_MANAGER_H40 #define LIBUSBHOST_HOST_USB_ENDPOINT_MANAGER_H 41 41 42 42 #include <stdlib.h> … … 52 52 hash_table_t ep_table; 53 53 fibril_mutex_t guard; 54 fibril_condvar_t change;55 54 size_t free_bw; 55 size_t (*bw_count)(usb_speed_t, usb_transfer_type_t, size_t, size_t); 56 56 } usb_endpoint_manager_t; 57 57 … … 60 60 61 61 int usb_endpoint_manager_init(usb_endpoint_manager_t *instance, 62 size_t available_bandwidth); 62 size_t available_bandwidth, 63 size_t (*bw_count)(usb_speed_t, usb_transfer_type_t, size_t, size_t)); 63 64 64 65 void usb_endpoint_manager_destroy(usb_endpoint_manager_t *instance); … … 77 78 usb_endpoint_manager_t *instance, usb_target_t target, const uint8_t *data); 78 79 80 /** Wrapper combining allocation and insertion */ 79 81 static inline int usb_endpoint_manager_add_ep(usb_endpoint_manager_t *instance, 80 82 usb_address_t address, usb_endpoint_t endpoint, usb_direction_t direction,
Note:
See TracChangeset
for help on using the changeset viewer.
