Ignore:
Timestamp:
2016-07-22T08:24:47Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
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.
Message:

Merge from lp:~jan.vesely/helenos/usb

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbvirt/include/usbvirt/virthub_base.h

    r5b18137 rb4b534ac  
    11/*
    2  * Copyright (c) 2010 Vojtech Horky
     2 * Copyright (c) 2013 Jan Vesely
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup drvusbvhc
     29/** @addtogroup libusbvirt
    3030 * @{
    3131 */
    3232/** @file
    33  * @brief Virtual USB hub.
     33 * Virtual USB device.
    3434 */
    3535
    36 #ifndef VHCD_HUB_H_
    37 #define VHCD_HUB_H_
     36#ifndef LIBUSBVIRT_VIRTHUB_BASE_H_
     37#define LIBUSBVIRT_VIRTHUB_BASE_H_
    3838
    3939#include <usbvirt/device.h>
    40 #include <ddf/driver.h>
     40#include <usb/classes/hub.h>
    4141
    42 #include "hub/hub.h"
    43 #include "hub/virthub.h"
     42enum {
     43        VIRTHUB_EXTR_DESC = 3,
     44};
    4445
    45 extern usbvirt_device_t virtual_hub_device;
     46typedef 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;
    4655
    47 void virtual_hub_device_init(ddf_fun_t *);
     56void *virthub_get_data(usbvirt_device_t *dev);
     57
     58int 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
     63usb_address_t virthub_base_get_address(virthub_base_t *instance);
     64
     65int 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
     69int 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);
     72int 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
    4876
    4977#endif
     78
    5079/**
    5180 * @}
Note: See TracChangeset for help on using the changeset viewer.