Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 741bcdeb in mainline for uspace/drv/bus/usb/ehci/ehci_bus.h


Ignore:
Timestamp:
2017-10-13T09:21:22Z (4 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master
Children:
c0e4b5b2
Parents:
e6b9182
Message:

WIP usbhost refactoring: ehci completed

vhc to go…

File:
1 moved

Legend:

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

    re6b9182 r741bcdeb  
    11/*
    22 * Copyright (c) 2011 Jan Vesely
     3 * Copyright (c) 2017 Ondrej Hlavaty <aearsis@eideo.cz>
    34 * All rights reserved.
    45 *
     
    3233 * @brief EHCI driver
    3334 */
    34 #ifndef DRV_EHCI_HCD_ENDPOINT_H
    35 #define DRV_EHCI_HCD_ENDPOINT_H
     35#ifndef DRV_EHCI_HCD_BUS_H
     36#define DRV_EHCI_HCD_BUS_H
    3637
    3738#include <assert.h>
    3839#include <adt/list.h>
     40#include <usb/host/usb2_bus.h>
    3941#include <usb/host/endpoint.h>
    40 #include <usb/host/hcd.h>
    4142
    4243#include "hw_struct/queue_head.h"
    43 #include "hw_struct/transfer_descriptor.h"
    4444
    4545/** Connector structure linking ED to to prepared TD. */
    4646typedef struct ehci_endpoint {
     47        /* Inheritance */
     48        endpoint_t base;
     49
    4750        /** EHCI endpoint descriptor */
    4851        qh_t *qh;
     
    5154} ehci_endpoint_t;
    5255
    53 int ehci_endpoint_init(hcd_t *hcd, endpoint_t *ep);
    54 void ehci_endpoint_fini(hcd_t *hcd, endpoint_t *ep);
     56typedef struct hc hc_t;
     57
     58typedef struct {
     59        usb2_bus_t base;
     60        hc_t *hc;
     61
     62        /* Stored original ops from base, they are called in our handlers */
     63        bus_ops_t parent_ops;
     64} ehci_bus_t;
     65
     66int ehci_bus_init(ehci_bus_t *, hc_t *);
    5567
    5668/** Get and convert assigned ehci_endpoint_t structure
     
    6173{
    6274        assert(ep);
    63         return ep->hc_data.data;
     75        return (ehci_endpoint_t *) ep;
    6476}
    6577
     
    7385 * @}
    7486 */
    75 
Note: See TracChangeset for help on using the changeset viewer.