Changeset df6ded8 in mainline for uspace/drv/bus/usb/ehci/ehci_bus.h
- Timestamp:
- 2018-02-28T16:37:50Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1b20da0
- Parents:
- f5e5f73 (diff), b2dca8de (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. - git-author:
- Jakub Jermar <jakub@…> (2018-02-28 16:06:42)
- git-committer:
- Jakub Jermar <jakub@…> (2018-02-28 16:37:50)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ehci/ehci_bus.h
rf5e5f73 rdf6ded8 1 1 /* 2 2 * Copyright (c) 2011 Jan Vesely 3 * Copyright (c) 2018 Ondrej Hlavaty 3 4 * All rights reserved. 4 5 * … … 32 33 * @brief EHCI driver 33 34 */ 34 #ifndef DRV_EHCI_HCD_ ENDPOINT_H35 #define DRV_EHCI_HCD_ ENDPOINT_H35 #ifndef DRV_EHCI_HCD_BUS_H 36 #define DRV_EHCI_HCD_BUS_H 36 37 37 38 #include <assert.h> 38 39 #include <adt/list.h> 40 #include <usb/host/usb2_bus.h> 39 41 #include <usb/host/endpoint.h> 40 #include <usb/ host/hcd.h>42 #include <usb/dma_buffer.h> 41 43 42 44 #include "hw_struct/queue_head.h" 43 #include "hw_struct/transfer_descriptor.h"44 45 45 46 /** Connector structure linking ED to to prepared TD. */ 46 47 typedef struct ehci_endpoint { 47 /** EHCI endpoint descriptor */ 48 /* Inheritance */ 49 endpoint_t base; 50 51 /** EHCI endpoint descriptor, backed by dma_buffer */ 48 52 qh_t *qh; 49 /** Linked list used by driver software */ 50 link_t link; 53 54 dma_buffer_t dma_buffer; 55 56 /** Link in endpoint_list */ 57 link_t eplist_link; 58 59 /** Link in pending_endpoints */ 60 link_t pending_link; 51 61 } ehci_endpoint_t; 52 62 53 errno_t ehci_endpoint_init(hcd_t *hcd, endpoint_t *ep); 54 void ehci_endpoint_fini(hcd_t *hcd, endpoint_t *ep); 63 typedef struct hc hc_t; 64 65 typedef struct { 66 bus_t base; 67 usb2_bus_helper_t helper; 68 hc_t *hc; 69 } ehci_bus_t; 70 71 void ehci_ep_toggle_reset(endpoint_t *); 72 void ehci_bus_prepare_ops(void); 73 74 errno_t ehci_bus_init(ehci_bus_t *, hc_t *); 55 75 56 76 /** Get and convert assigned ehci_endpoint_t structure 57 77 * @param[in] ep USBD endpoint structure. 58 * @return Pointer to assigned hcdendpoint structure78 * @return Pointer to assigned ehci endpoint structure 59 79 */ 60 static inline ehci_endpoint_t * 80 static inline ehci_endpoint_t *ehci_endpoint_get(const endpoint_t *ep) 61 81 { 62 82 assert(ep); 63 return ep->hc_data.data;83 return (ehci_endpoint_t *) ep; 64 84 } 65 85 66 static inline ehci_endpoint_t * 86 static inline ehci_endpoint_t *ehci_endpoint_list_instance(link_t *l) 67 87 { 68 return list_get_instance(l, ehci_endpoint_t, link);88 return list_get_instance(l, ehci_endpoint_t, eplist_link); 69 89 } 70 90 … … 73 93 * @} 74 94 */ 75
Note:
See TracChangeset
for help on using the changeset viewer.