Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/uhci/hc.h

    rf58ef61 r26858040  
    3939#include <ddi.h>
    4040
    41 #include <usb/host/hcd.h>
     41#include <usb/host/device_keeper.h>
     42#include <usb/host/usb_endpoint_manager.h>
     43#include <usb/host/batch.h>
    4244
    4345#include "transfer_list.h"
     
    9294/** Main UHCI driver structure */
    9395typedef struct hc {
    94         /** Generic HCD driver structure */
    95         hcd_t generic;
     96        /** USB bus driver, devices and addresses */
     97        usb_device_keeper_t manager;
     98        /** USB bus driver, endpoints */
     99        usb_endpoint_manager_t ep_manager;
    96100
    97101        /** Addresses of I/O registers */
     
    120124        unsigned hw_failures;
    121125} hc_t;
    122 
    123126size_t hc_irq_cmd_count(void);
    124127int hc_get_irq_commands(
    125128    irq_cmd_t cmds[], size_t cmd_size, uintptr_t regs, size_t reg_size);
     129int hc_init(hc_t *instance, void *regs, size_t reg_size, bool interupts);
     130int hc_schedule(hc_t *instance, usb_transfer_batch_t *batch);
    126131void hc_interrupt(hc_t *instance, uint16_t status);
    127 int hc_init(hc_t *instance, void *regs, size_t reg_size, bool interupts);
    128132
    129133/** Safely dispose host controller internal structures
     
    131135 * @param[in] instance Host controller structure to use.
    132136 */
    133 static inline void hc_fini(hc_t *instance) {} /* TODO: implement*/
     137static inline void hc_fini(hc_t *instance) { /* TODO: implement*/ };
     138
     139/** Get and cast pointer to the driver data
     140 *
     141 * @param[in] fun DDF function pointer
     142 * @return cast pointer to driver_data
     143 */
     144static inline hc_t * fun_to_hc(ddf_fun_t *fun)
     145{
     146        assert(fun);
     147        return fun->driver_data;
     148}
    134149#endif
    135150/**
Note: See TracChangeset for help on using the changeset viewer.