Changes in uspace/drv/bus/usb/vhc/vhcd.h [b7fd2a0:ae3a941] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/vhc/vhcd.h
rb7fd2a0 rae3a941 1 1 /* 2 2 * Copyright (c) 2010 Vojtech Horky 3 * Copyright (c) 2018 Ondrej Hlavaty 3 4 * All rights reserved. 4 5 * … … 38 39 39 40 #include <usbvirt/device.h> 40 #include <usbhc_iface.h>41 41 #include <async.h> 42 #include <macros.h> 42 43 43 44 #include <usb/host/hcd.h> 45 #include <usb/host/usb2_bus.h> 46 #include <usb/host/usb_transfer_batch.h> 44 47 45 48 #define NAME "vhc" … … 56 59 57 60 typedef struct { 58 uint32_t magic; 61 hc_device_t base; 62 63 bus_t bus; 64 usb2_bus_helper_t bus_helper; 65 66 ddf_fun_t *virtual_fun; 59 67 list_t devices; 60 68 fibril_mutex_t guard; … … 63 71 64 72 typedef struct { 73 usb_transfer_batch_t batch; 65 74 link_t link; 66 usb_transfer_batch_t *batch;67 75 } vhc_transfer_t; 76 77 static inline vhc_data_t *hcd_to_vhc(hc_device_t *hcd) 78 { 79 assert(hcd); 80 return (vhc_data_t *) hcd; 81 } 82 83 static inline vhc_data_t *bus_to_vhc(bus_t *bus) 84 { 85 assert(bus); 86 return member_to_inst(bus, vhc_data_t, bus); 87 } 68 88 69 89 void on_client_close(ddf_fun_t *fun); … … 73 93 errno_t vhc_virtdev_plug(vhc_data_t *, async_sess_t *, uintptr_t *); 74 94 errno_t vhc_virtdev_plug_local(vhc_data_t *, usbvirt_device_t *, uintptr_t *); 75 errno_t vhc_virtdev_plug_hub(vhc_data_t *, usbvirt_device_t *, uintptr_t *, usb_address_t address); 95 errno_t vhc_virtdev_plug_hub(vhc_data_t *, usbvirt_device_t *, uintptr_t *, 96 usb_address_t address); 76 97 void vhc_virtdev_unplug(vhc_data_t *, uintptr_t); 77 98 78 errno_t vhc_init(vhc_data_t * instance);79 errno_t vhc_schedule( hcd_t *hcd, usb_transfer_batch_t *batch);99 errno_t vhc_init(vhc_data_t *); 100 errno_t vhc_schedule(usb_transfer_batch_t *); 80 101 errno_t vhc_transfer_queue_processor(void *arg); 81 102
Note:
See TracChangeset
for help on using the changeset viewer.