Changeset b4b534ac in mainline for uspace/drv/bus/usb/ehci/ehci_endpoint.h
- Timestamp:
- 2016-07-22T08:24:47Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f76d2c2
- Parents:
- 5b18137 (diff), 8351f9a4 (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. - File:
-
- 1 moved
-
uspace/drv/bus/usb/ehci/ehci_endpoint.h (moved) (moved from uspace/drv/bus/usb/uhcirh/root_hub.h ) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ehci/ehci_endpoint.h
r5b18137 rb4b534ac 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 /** @addtogroup drvusb uhcirh28 /** @addtogroup drvusbehci 29 29 * @{ 30 30 */ 31 31 /** @file 32 * @brief UHCI driver32 * @brief EHCI driver 33 33 */ 34 #ifndef DRV_ UHCI_ROOT_HUB_H35 #define DRV_ UHCI_ROOT_HUB_H34 #ifndef DRV_EHCI_HCD_ENDPOINT_H 35 #define DRV_EHCI_HCD_ENDPOINT_H 36 36 37 #include <ddf/driver.h> 38 #include <device/hw_res_parsed.h> 37 #include <assert.h> 38 #include <adt/list.h> 39 #include <usb/host/endpoint.h> 40 #include <usb/host/hcd.h> 39 41 40 #include "port.h" 42 #include "hw_struct/queue_head.h" 43 #include "hw_struct/transfer_descriptor.h" 41 44 42 #define UHCI_ROOT_HUB_PORT_COUNT 2 43 #define ROOT_HUB_WAIT_USEC 250000 /* 250 miliseconds */ 45 /** Connector structure linking ED to to prepared TD. */ 46 typedef struct ehci_endpoint { 47 /** EHCI endpoint descriptor */ 48 qh_t *qh; 49 /** Linked list used by driver software */ 50 link_t link; 51 } ehci_endpoint_t; 44 52 45 /** UHCI root hub drvier structure */ 46 typedef struct root_hub { 47 /** Ports provided by the hub */ 48 uhci_port_t ports[UHCI_ROOT_HUB_PORT_COUNT]; 49 } uhci_root_hub_t; 53 int ehci_endpoint_init(hcd_t *hcd, endpoint_t *ep); 54 void ehci_endpoint_fini(hcd_t *hcd, endpoint_t *ep); 50 55 51 int uhci_root_hub_init(uhci_root_hub_t *instance, addr_range_t *regs, 52 ddf_dev_t *rh); 56 /** Get and convert assigned ehci_endpoint_t structure 57 * @param[in] ep USBD endpoint structure. 58 * @return Pointer to assigned hcd endpoint structure 59 */ 60 static inline ehci_endpoint_t * ehci_endpoint_get(const endpoint_t *ep) 61 { 62 assert(ep); 63 return ep->hc_data.data; 64 } 53 65 54 void uhci_root_hub_fini(uhci_root_hub_t *instance); 66 static inline ehci_endpoint_t * ehci_endpoint_list_instance(link_t *l) 67 { 68 return list_get_instance(l, ehci_endpoint_t, link); 69 } 70 55 71 #endif 56 72 /** 57 73 * @} 58 74 */ 75
Note:
See TracChangeset
for help on using the changeset viewer.
