Changeset 2b61945 in mainline for uspace/drv/bus/usb/xhci/endpoint.h
- Timestamp:
- 2017-10-22T03:47:41Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2e5aea1
- Parents:
- 766043c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/endpoint.h
r766043c r2b61945 44 44 45 45 #include "hc.h" 46 #include "transfers.h" 46 47 47 48 typedef struct xhci_device xhci_device_t; … … 64 65 endpoint_t base; /**< Inheritance. Keep this first. */ 65 66 66 /** Parent device. */ 67 xhci_device_t *device; 67 /** Main TRB ring */ 68 xhci_trb_ring_t ring; 69 70 /** There shall be only one transfer active on an endpoint. The 71 * synchronization is performed using the active flag in base 72 * endpoint_t */ 73 xhci_transfer_t active_transfer; 68 74 } xhci_endpoint_t; 69 75 70 76 typedef struct xhci_device { 71 /** Unique USB address assigned to the device. */ 72 usb_address_t address; 77 device_t base; /**< Inheritance. Keep this first. */ 73 78 74 79 /** Slot ID assigned to the device by xHC. */ 75 80 uint32_t slot_id; 76 81 77 /** Associated device in libusbhost.*/78 device_t *device;82 /** Place to store virtual address for allocated context */ 83 xhci_device_ctx_t *dev_ctx; 79 84 80 85 /** All endpoints of the device. Inactive ones are NULL */ … … 97 102 void xhci_device_fini(xhci_device_t *); 98 103 104 uint8_t xhci_endpoint_dci(xhci_endpoint_t *); 99 105 uint8_t xhci_endpoint_index(xhci_endpoint_t *); 100 106 … … 104 110 int xhci_device_configure(xhci_device_t *, xhci_hc_t *); 105 111 112 static inline xhci_device_t * xhci_device_get(device_t *dev) 113 { 114 assert(dev); 115 return (xhci_device_t *) dev; 116 } 117 106 118 static inline xhci_endpoint_t * xhci_endpoint_get(endpoint_t *ep) 107 119 { 108 120 assert(ep); 109 121 return (xhci_endpoint_t *) ep; 122 } 123 124 static inline xhci_device_t * xhci_ep_to_dev(xhci_endpoint_t *ep) 125 { 126 assert(ep); 127 return xhci_device_get(ep->base.device); 110 128 } 111 129
Note:
See TracChangeset
for help on using the changeset viewer.