Changeset 01eeaaf in mainline for uspace/drv/bus/usb/vhc/vhcd.h


Ignore:
Timestamp:
2012-12-22T15:07:29Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f6577d9
Parents:
94c40ce2
Message:

vhc: Port to libusbhost.

Device removal works OK.
Tested on vuh boot and vuh lw1.

File:
1 edited

Legend:

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

    r94c40ce2 r01eeaaf  
    4343#include <async.h>
    4444
     45#include <usb/host/hcd.h>
     46
     47
    4548#define NAME "vhc"
    4649
     
    6770typedef struct {
    6871        link_t link;
     72
     73        usb_transfer_batch_t *batch;
     74
    6975        usb_address_t address;
    7076        usb_endpoint_t endpoint;
     
    8187} vhc_transfer_t;
    8288
     89static inline void vhc_data_init(vhc_data_t *instance)
     90{
     91        assert(instance);
     92        list_initialize(&instance->devices);
     93        fibril_mutex_initialize(&instance->guard);
     94        instance->magic = 0xDEADBEEF;
     95}
     96
     97
    8398vhc_transfer_t *vhc_transfer_create(usb_address_t, usb_endpoint_t,
    8499    usb_direction_t, usb_transfer_type_t, ddf_fun_t *, void *);
    85100int vhc_virtdev_plug(vhc_data_t *, async_sess_t *, uintptr_t *);
    86101int vhc_virtdev_plug_local(vhc_data_t *, usbvirt_device_t *, uintptr_t *);
    87 int vhc_virtdev_plug_hub(vhc_data_t *, usbvirt_device_t *, uintptr_t *);
     102int vhc_virtdev_plug_hub(vhc_data_t *, usbvirt_device_t *, uintptr_t *, usb_address_t address);
    88103void vhc_virtdev_unplug(vhc_data_t *, uintptr_t);
    89104int vhc_virtdev_add_transfer(vhc_data_t *, vhc_transfer_t *);
     
    92107
    93108
     109int vhc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch);
     110
    94111#endif
    95112/**
Note: See TracChangeset for help on using the changeset viewer.