Ignore:
Timestamp:
2016-07-22T08:24:47Z (10 years ago)
Author:
Jakub Jermar <jakub@…>
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.
Message:

Merge from lp:~jan.vesely/helenos/usb

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ehci/ehci_endpoint.h

    r5b18137 rb4b534ac  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
    28 /** @addtogroup drvusbuhcirh
     28/** @addtogroup drvusbehci
    2929 * @{
    3030 */
    3131/** @file
    32  * @brief UHCI driver
     32 * @brief EHCI driver
    3333 */
    34 #ifndef DRV_UHCI_ROOT_HUB_H
    35 #define DRV_UHCI_ROOT_HUB_H
     34#ifndef DRV_EHCI_HCD_ENDPOINT_H
     35#define DRV_EHCI_HCD_ENDPOINT_H
    3636
    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>
    3941
    40 #include "port.h"
     42#include "hw_struct/queue_head.h"
     43#include "hw_struct/transfer_descriptor.h"
    4144
    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. */
     46typedef 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;
    4452
    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;
     53int ehci_endpoint_init(hcd_t *hcd, endpoint_t *ep);
     54void ehci_endpoint_fini(hcd_t *hcd, endpoint_t *ep);
    5055
    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 */
     60static inline ehci_endpoint_t * ehci_endpoint_get(const endpoint_t *ep)
     61{
     62        assert(ep);
     63        return ep->hc_data.data;
     64}
    5365
    54 void uhci_root_hub_fini(uhci_root_hub_t *instance);
     66static inline ehci_endpoint_t * ehci_endpoint_list_instance(link_t *l)
     67{
     68        return list_get_instance(l, ehci_endpoint_t, link);
     69}
     70
    5571#endif
    5672/**
    5773 * @}
    5874 */
     75
Note: See TracChangeset for help on using the changeset viewer.