Changeset 5fd9c30 in mainline for uspace/lib/usbhost/include/usb/host/bus.h
- Timestamp:
- 2017-10-21T20:52:56Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 766043c
- Parents:
- 74b852b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/include/usb/host/bus.h
r74b852b r5fd9c30 33 33 * 34 34 * The purpose of this structure is to keep information about connected devices 35 * and en points, manage available bandwidth and the toggle bit flipping.35 * and endpoints, manage available bandwidth and the toggle bit flipping. 36 36 * 37 37 * The generic implementation is provided for USB 1 and 2 in usb2_bus.c. Some … … 53 53 typedef struct bus bus_t; 54 54 typedef struct ddf_fun ddf_fun_t; 55 typedef struct usb_transfer_batch usb_transfer_batch_t; 55 56 56 57 typedef struct device { … … 85 86 int (*release_endpoint)(bus_t *, endpoint_t *); 86 87 endpoint_t *(*find_endpoint)(bus_t *, usb_target_t, usb_direction_t); 88 void (*destroy_endpoint)(endpoint_t *); /**< Optional */ 89 bool (*endpoint_get_toggle)(endpoint_t *); /**< Optional */ 90 void (*endpoint_set_toggle)(endpoint_t *, bool); /**< Optional */ 87 91 88 92 int (*request_address)(bus_t *, usb_address_t*, bool, usb_speed_t); … … 93 97 size_t (*count_bw) (endpoint_t *, size_t); 94 98 95 /* Endpoint ops, optional (have generic fallback) */ 96 void (*destroy_endpoint)(endpoint_t *); 97 bool (*endpoint_get_toggle)(endpoint_t *); 98 void (*endpoint_set_toggle)(endpoint_t *, bool); 99 usb_transfer_batch_t *(*create_batch)(bus_t *, endpoint_t *); /**< Optional */ 100 void (*destroy_batch)(usb_transfer_batch_t *); /**< Optional */ 99 101 } bus_ops_t; 100 102 … … 135 137 int bus_release_address(bus_t *, usb_address_t); 136 138 139 137 140 static inline int bus_reserve_default_address(bus_t *bus, usb_speed_t speed) { 138 141 usb_address_t addr = USB_ADDRESS_DEFAULT;
Note:
See TracChangeset
for help on using the changeset viewer.