VirtualBox

Changeset 53210 in vbox for trunk/include


Ignore:
Timestamp:
Nov 4, 2014 6:07:07 PM (10 years ago)
Author:
vboxsync
Message:

PDM/VUSB: Provide port/device speed to HCs (and emulated devices).

Location:
trunk/include/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmusb.h

    r53097 r53210  
    784784    /** The tracing ID of this device.  */
    785785    uint32_t                    idTracing;
    786     /** The USB version of the hub this device is attached to. Used to
    787      * determine whether the device communicates at high-speed or full-/low-speed. */
    788     uint32_t                    iUsbHubVersion;
     786    /** The port/device speed. HCs and emulated devices need to know. */
     787    VUSBSPEED                   enmSpeed;
    789788
    790789    /** Padding to make achInstanceData aligned at 32 byte boundary. */
     
    797796
    798797/** Current USBINS version number. */
    799 #define PDM_USBINS_VERSION                      PDM_VERSION_MAKE(0xeefd, 2, 0)
     798#define PDM_USBINS_VERSION                      PDM_VERSION_MAKE(0xeefd, 3, 0)
    800799
    801800/**
  • trunk/include/VBox/vusb.h

    r53121 r53210  
    479479/** @} */
    480480
     481/**
     482 * USB port/device speeds.
     483 */
     484typedef enum VUSBSPEED
     485{
     486    /** Undetermined/unknown speed. */
     487    VUSB_SPEED_UNKNOWN = 0,
     488    /** Low-speed (LS), 1.5 Mbit/s, USB 1.0. */
     489    VUSB_SPEED_LOW,
     490    /** Full-speed (FS), 12 Mbit/s, USB 1.1. */
     491    VUSB_SPEED_FULL,
     492    /** High-speed (HS), 480 Mbit/s, USB 2.0. */
     493    VUSB_SPEED_HIGH,
     494    /** Variable speed, wireless USB 2.5. */
     495    VUSB_SPEED_VARIABLE,
     496    /** SuperSpeed (SS), 5.0 Gbit/s, USB 3.0. */
     497    VUSB_SPEED_SUPER,
     498    /** SuperSpeed+ (SS+), 10.0 Gbit/s, USB 3.1. */
     499    VUSB_SPEED_SUPERPLUS,
     500    /** The usual 32-bit hack. */
     501    VUSB_SPEED_32BIT_HACK = 0x7fffffff
     502} VUSBSPEED;
    481503
    482504/** Pointer to a VBox USB device interface. */
     
    808830     */
    809831    VUSB_DEVICE_STATE_RESET,
    810     /** The device has been destroy. */
     832    /** The device has been destroyed. */
    811833    VUSB_DEVICE_STATE_DESTROYED,
    812834    /** The usual 32-bit hack. */
     
    882904     */
    883905    DECLR3CALLBACKMEMBER(bool, pfnIsEmulated,(PVUSBIDEVICE pInterface));
     906
     907    /**
     908     * Get the speed the device is operating at.
     909     *
     910     * @returns Device state.
     911     * @param   pInterface      Pointer to the device interface structure.
     912     */
     913    DECLR3CALLBACKMEMBER(VUSBSPEED, pfnGetSpeed,(PVUSBIDEVICE pInterface));
    884914
    885915} VUSBIDEVICE;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette