Changeset b4b534ac in mainline for uspace/lib/usbvirt/include/usbvirt/virthub_base.h
- Timestamp:
- 2016-07-22T08:24:47Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f76d2c2
- Parents:
- 5b18137 (diff), 8351f9a4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbvirt/include/usbvirt/virthub_base.h
r5b18137 rb4b534ac 1 1 /* 2 * Copyright (c) 201 0 Vojtech Horky2 * Copyright (c) 2013 Jan Vesely 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup drvusbvhc29 /** @addtogroup libusbvirt 30 30 * @{ 31 31 */ 32 32 /** @file 33 * @brief Virtual USB hub.33 * Virtual USB device. 34 34 */ 35 35 36 #ifndef VHCD_HUB_H_37 #define VHCD_HUB_H_36 #ifndef LIBUSBVIRT_VIRTHUB_BASE_H_ 37 #define LIBUSBVIRT_VIRTHUB_BASE_H_ 38 38 39 39 #include <usbvirt/device.h> 40 #include < ddf/driver.h>40 #include <usb/classes/hub.h> 41 41 42 #include "hub/hub.h" 43 #include "hub/virthub.h" 42 enum { 43 VIRTHUB_EXTR_DESC = 3, 44 }; 44 45 45 extern usbvirt_device_t virtual_hub_device; 46 typedef struct { 47 usb_standard_configuration_descriptor_t config_descriptor; 48 usb_standard_endpoint_descriptor_t endpoint_descriptor; 49 usbvirt_device_configuration_extras_t extra[VIRTHUB_EXTR_DESC]; 50 usbvirt_device_configuration_t configuration; 51 usbvirt_descriptors_t descriptors; 52 usbvirt_device_t device; 53 void *data; 54 } virthub_base_t; 46 55 47 void virtual_hub_device_init(ddf_fun_t *); 56 void *virthub_get_data(usbvirt_device_t *dev); 57 58 int virthub_base_init(virthub_base_t *instance, 59 const char *name, usbvirt_device_ops_t *ops, void *data, 60 const usb_standard_device_descriptor_t *device_desc, 61 const usb_hub_descriptor_header_t *hub_desc, usb_endpoint_t ep); 62 63 usb_address_t virthub_base_get_address(virthub_base_t *instance); 64 65 int virthub_base_request(virthub_base_t *instance, usb_target_t target, 66 usb_direction_t dir, const usb_device_request_setup_packet_t *setup, 67 void *buffer, size_t buffer_size, size_t *real_size); 68 69 int virthub_base_get_hub_descriptor(usbvirt_device_t *dev, 70 const usb_device_request_setup_packet_t *request, uint8_t *data, 71 size_t *act_size); 72 int virthub_base_get_null_status(usbvirt_device_t *dev, 73 const usb_device_request_setup_packet_t *request, uint8_t *data, 74 size_t *act_size); 75 48 76 49 77 #endif 78 50 79 /** 51 80 * @}
Note:
See TracChangeset
for help on using the changeset viewer.