Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/vhc/vhcd.h

    r58563585 rd369b3b  
    3838
    3939#include <usbvirt/device.h>
    40 #include <usbhc_iface.h>
    4140#include <async.h>
     41#include <macros.h>
    4242
    4343#include <usb/host/hcd.h>
     44#include <usb/host/usb2_bus.h>
     45#include <usb/host/usb_transfer_batch.h>
    4446
    4547#define NAME "vhc"
     
    5658
    5759typedef struct {
    58         uint32_t magic;
     60        hc_device_t base;
     61
     62        bus_t bus;
     63        usb2_bus_helper_t bus_helper;
     64
     65        ddf_fun_t *virtual_fun;
    5966        list_t devices;
    6067        fibril_mutex_t guard;
     
    6370
    6471typedef struct {
     72        usb_transfer_batch_t batch;
    6573        link_t link;
    66         usb_transfer_batch_t *batch;
    6774} vhc_transfer_t;
     75
     76static inline vhc_data_t *hcd_to_vhc(hc_device_t *hcd)
     77{
     78        assert(hcd);
     79        return (vhc_data_t *) hcd;
     80}
     81
     82static inline vhc_data_t *bus_to_vhc(bus_t *bus)
     83{
     84        assert(bus);
     85        return member_to_inst(bus, vhc_data_t, bus);
     86}
    6887
    6988void on_client_close(ddf_fun_t *fun);
     
    7695void vhc_virtdev_unplug(vhc_data_t *, uintptr_t);
    7796
    78 int vhc_init(vhc_data_t *instance);
    79 int vhc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch);
     97int vhc_init(vhc_data_t *);
     98int vhc_schedule(usb_transfer_batch_t *);
    8099int vhc_transfer_queue_processor(void *arg);
    81100
Note: See TracChangeset for help on using the changeset viewer.