VirtualBox

Changeset 15075 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Dec 8, 2008 3:06:50 AM (16 years ago)
Author:
vboxsync
Message:

Added interfaces for shared USB timer, currently mostly disabled.

Location:
trunk/include/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/pdmifs.h

    r14610 r15075  
    152152    PDMINTERFACE_VUSB_RH_CONFIG,
    153153
    154     /** VUSBROOTHUBCONNECTOR    - VUSB Device interface.                (Up)     No coupling. */
     154    /** VUSBIDEVICE             - VUSB Device interface.                (Up)     No coupling. */
    155155    PDMINTERFACE_VUSB_DEVICE,
     156
     157    /** VUSBITIMER              - VUSB Timer interface.                 (Up)     No coupling. */
     158    PDMINTERFACE_VUSB_TIMER,
    156159
    157160    /** PDMIHOSTPARALLELPORT    - The Host Parallel port interface.     (Down)   Coupled with PDMINTERFACE_HOST_PARALLEL_CONNECTOR. */
  • trunk/include/VBox/vusb.h

    r8155 r15075  
    330330typedef struct VUSBIROOTHUBPORT *PVUSBIROOTHUBPORT;
    331331
     332/** Pointer to a VBox USB timer interface. */
     333typedef struct VUSBITIMER       *PVUSBITIMER;
     334
    332335/** Pointer to an USB request descriptor. */
    333336typedef struct VUSBURB          *PVUSBURB;
     
    760763{
    761764    return pInterface->pfnGetState(pInterface);
     765}
     766#endif /* IN_RING3 */
     767
     768
     769/**
     770 * USB Timer Interface.
     771 */
     772typedef struct VUSBITIMER
     773{
     774    /**
     775     * Sets up initial frame timer parameters.
     776     *
     777     * @returns VBox status code.
     778     * @param   pInterface      Pointer to the timer interface structure.
     779     * @param   pfnCallback     Pointer to the timer callback function.
     780     * @param   rate            Requested frame rate (normally 1,000).
     781     */
     782    DECLR3CALLBACKMEMBER(int, pfnTimerSetup,(PVUSBITIMER pInterface, PFNTMTIMERDEV pfnCallback, uint32_t rate));
     783
     784    /**
     785     * Requests another tick of the frame timer.
     786     *
     787     * @returns VBox status code.
     788     * @param   pInterface      Pointer to the timer interface structure.
     789     */
     790    DECLR3CALLBACKMEMBER(int, pfnTimerSetNext,(PVUSBITIMER pInterface));
     791
     792    /**
     793     * Stops the frame timer for the caller.
     794     *
     795     * @returns VBox status code.
     796     * @param   pInterface      Pointer to the timer interface structure.
     797     */
     798    DECLR3CALLBACKMEMBER(int, pfnTimerStop,(PVUSBITIMER pInterface));
     799
     800} VUSBITIMER;
     801
     802
     803#ifdef IN_RING3
     804/**
     805 * Sets up initial frame timer parameters.
     806 *
     807 * @returns VBox status code.
     808 * @param   pInterface      Pointer to the timer interface structure.
     809 * @param   pfnCallback     Pointer to the timer callback function.
     810 * @param   rate            Requested frame rate (normally 1,000).
     811 */
     812DECLINLINE(int) VUSBITimerSetup(PVUSBITIMER pInterface, PFNTMTIMERDEV pfnCallback, uint32_t rate)
     813{
     814    return pInterface->pfnTimerSetup(pInterface, pfnCallback, rate);
     815}
     816
     817/**
     818 * Requests another tick of the USB frame timer.
     819 *
     820 * @returns VBox status code.
     821 * @param   pInterface      Pointer to the timer interface structure.
     822 */
     823DECLINLINE(int) VUSBITimerSetNext(PVUSBITIMER pInterface)
     824{
     825    return pInterface->pfnTimerSetNext(pInterface);
     826}
     827
     828/**
     829 * Stops the USB frame timer for the caller.
     830 *
     831 * @returns VBox status code.
     832 * @param   pInterface      Pointer to the timer interface structure.
     833 */
     834DECLINLINE(int) VUSBITimerStop(PVUSBITIMER pInterface)
     835{
     836    return pInterface->pfnTimerStop(pInterface);
    762837}
    763838#endif /* IN_RING3 */
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