VirtualBox

Changeset 4626 in vbox


Ignore:
Timestamp:
Sep 8, 2007 7:12:18 AM (17 years ago)
Author:
vboxsync
Message:

A couple of more getters.

File:
1 edited

Legend:

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

    r4184 r4626  
    7272
    7373
    74 /** @name PCI Configuration Space Registers 
     74/** @name PCI Configuration Space Registers
    7575 * @{ */
    7676#define VBOX_PCI_VENDOR_ID              0x00    /**< 16-bit RO */
     
    120120
    121121
    122 /** 
     122/**
    123123 * Callback function for reading from the PCI configuration space.
    124124 *
     
    134134typedef PFNPCICONFIGREAD *PPFNPCICONFIGREAD;
    135135
    136 /** 
     136/**
    137137 * Callback function for writing to the PCI configuration space.
    138138 *
    139139 * @param   pPciDev         Pointer to PCI device. Use pPciDev->pDevIns to get the device instance.
    140140 * @param   Address         The configuration space register address. [0..255]
    141  * @param   u32Value        The value that's being written. The number of bits actually used from 
     141 * @param   u32Value        The value that's being written. The number of bits actually used from
    142142 *                          this value is determined by the cb parameter.
    143143 * @param   cb              The register size. [1,2,4]
     
    237237}
    238238
     239/**
     240 * Gets the sub-system vendor id config register.
     241 * @returns the sub-system vendor id.
     242 * @param   pPciDev         The PCI device.
     243 */
     244DECLINLINE(uint16_t) PCIDevGetSubSystemVendorId(PPCIDEVICE pPciDev)
     245{
     246    return RT_LE2H_U16(RT_MAKE_U16(pPciDev->config[VBOX_PCI_SUBSYSTEM_VENDOR_ID], pPciDev->config[VBOX_PCI_SUBSYSTEM_VENDOR_ID + 1]));
     247}
     248
     249/**
     250 * Gets the sub-system id config register.
     251 * @returns the sub-system id.
     252 * @param   pPciDev         The PCI device.
     253 */
     254DECLINLINE(uint16_t) PCIDevGetSubSystemId(PPCIDEVICE pPciDev)
     255{
     256    return RT_LE2H_U16(RT_MAKE_U16(pPciDev->config[VBOX_PCI_SUBSYSTEM_ID], pPciDev->config[VBOX_PCI_SUBSYSTEM_ID + 1]));
     257}
     258
    239259
    240260/** @} */
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