VirtualBox

Changeset 108557 in vbox for trunk/include


Ignore:
Timestamp:
Mar 14, 2025 9:52:06 AM (5 weeks ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
167954
Message:

Runtime/RTAcpi*: Some additions to create GpioInt() resource descriptors, bugref:10732

Location:
trunk/include/iprt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/acpi.h

    r108231 r108557  
    387387 */
    388388RTDECL(int) RTAcpiTblMethodStart(RTACPITBL hAcpiTbl, const char *pszName, uint8_t cArgs, uint32_t fFlags, uint8_t uSyncLvl);
     389
     390
     391/**
     392 * Starts a new method object for the given ACPI table in the current scope.
     393 *
     394 * @returns IPRT status code.
     395 * @param   hAcpiTbl            The ACPI table handle.
     396 * @param   fFlags              AML method flags, see RTACPI_METHOD_F_XXX.
     397 * @param   cArgs               Number of arguments this method takes.
     398 * @param   uSyncLvl            The sync level.
     399 * @param   pszNameFmt          The method name format string.
     400 * @param   ...                 Format string arguments.
     401 */
     402RTDECL(int) RTAcpiTblMethodStartF(RTACPITBL hAcpiTbl, uint8_t cArgs, uint32_t fFlags, uint8_t uSyncLvl,
     403                                  const char *pszNameFmt, ...) RT_IPRT_FORMAT_ATTR(5, 6);
     404
     405
     406/**
     407 * Starts a new method object for the given ACPI table in the current scope.
     408 *
     409 * @returns IPRT status code.
     410 * @param   hAcpiTbl            The ACPI table handle.
     411 * @param   fFlags              AML method flags, see RTACPI_METHOD_F_XXX.
     412 * @param   cArgs               Number of arguments this method takes.
     413 * @param   uSyncLvl            The sync level.
     414 * @param   pszNameFmt          The method name format string.
     415 * @param   va                  Format string arguments.
     416 */
     417RTDECL(int) RTAcpiTblMethodStartV(RTACPITBL hAcpiTbl, uint8_t cArgs, uint32_t fFlags, uint8_t uSyncLvl,
     418                                  const char *pszNameFmt, va_list va) RT_IPRT_FORMAT_ATTR(5, 0);
    389419
    390420
     
    14201450                                 RTACPIRESDMATRANSFERTYPE enmTransferType, uint8_t bmChannels);
    14211451
     1452
     1453/**
     1454 * GPIO Interrupt type.
     1455 */
     1456typedef enum RTACPIRESGPIOMOD
     1457{
     1458    /** Invalid type. */
     1459    kAcpiResGpioMod_Invalid = 0,
     1460    /** Edge interrupt type. */
     1461    kAcpiResGpioMod_Edge,
     1462    /** Level interrupt type. */
     1463    kAcpiResGpioMod_Level,
     1464    /** 32-bit blowup hack. */
     1465    kAcpiResGpioMod_32Bit_Hack = 0x7fffffff
     1466} RTACPIRESGPIOMOD;
     1467
     1468
     1469/**
     1470 * GPIO polarity config.
     1471 */
     1472typedef enum RTACPIRESGPIOPOL
     1473{
     1474    /** Invalid type. */
     1475    kAcpiResGpioPol_Invalid = 0,
     1476    /** Active if input is high. */
     1477    kAcpiResGpioPol_ActiveHigh,
     1478    /** Active if input is low. */
     1479    kAcpiResGpioPol_ActiveLow,
     1480    /** Active on both (only supported if interrupt type is Edge). */
     1481    kAcpiResGpioPol_ActiveBoth,
     1482    /** 32-bit blowup hack. */
     1483    kAcpiResGpioPol_32Bit_Hack = 0x7fffffff
     1484} RTACPIRESGPIOPOL;
     1485
     1486
     1487/**
     1488 * GPIO shared/exclusive config.
     1489 */
     1490typedef enum RTACPIRESGPIOSHR
     1491{
     1492    /** Invalid type. */
     1493    kAcpiResGpioShr_Invalid = 0,
     1494    /** GPIO pins are shared. */
     1495    kAcpiResGpioShr_Shared,
     1496    /** GPIO pins are exclusive. */
     1497    kAcpiResGpioShr_Exclusive,
     1498    /** GPIO pins are shared and capabale to wake the system. */
     1499    kAcpiResGpioShr_SharedAndWake,
     1500    /** GPIO pins are exclusive and capabale to wake the system. */
     1501    kAcpiResGpioShr_ExclusiveAndWake,
     1502    /** 32-bit blowup hack. */
     1503    kAcpiResGpioShr_32Bit_Hack = 0x7fffffff
     1504} RTACPIRESGPIOSHR;
     1505
     1506
     1507/**
     1508 * GPIO pin config.
     1509 */
     1510typedef enum RTACPIRESGPIOPPI
     1511{
     1512    /** Invalid config. */
     1513    kAcpiResGpioPpi_Invalid = 0,
     1514    /** Default pull up/down config. */
     1515    kAcpiResGpioPpi_PullDefault,
     1516    /** Pin is pulled up. */
     1517    kAcpiResGpioPpi_PullUp,
     1518    /** Pin is pulled down. */
     1519    kAcpiResGpioPpi_PullDown,
     1520    /** Pin has no pull up/down resistor attached and is floating. */
     1521    kAcpiResGpioPpi_PullNone,
     1522    /** 32-bit blowup hack. */
     1523    kAcpiResGpioPpi_32Bit_Hack = 0x7fffffff
     1524} RTACPIRESGPIOPPI;
     1525
     1526
     1527/**
     1528 * Adds a GPIO connection descriptor suitable for GPIO input pins with interrupt support
     1529 * with the given configuration to the given ACPI resource.
     1530 *
     1531 * @returns IPRT status code.
     1532 * @param   hAcpiRes            The ACPI resource handle.
     1533 */
     1534RTDECL(int) RTAcpiResourceAddGpioInt(RTACPIRES hAcpiRes, RTACPIRESGPIOMOD enmMod, RTACPIRESGPIOPOL enmPol, RTACPIRESGPIOSHR enmShr,
     1535                                     RTACPIRESGPIOPPI enmPpi, uint16_t u16DebounceWait, const char *pszRsrcSrc,
     1536                                     uint16_t *pau16Pins, uint16_t cPins);
     1537
    14221538/** @} */
    14231539
  • trunk/include/iprt/mangling.h

    r108221 r108557  
    382382# define RTAcpiResourceAddDWordMemoryRangeEx            RT_MANGLER(RTAcpiResourceAddDWordMemoryRangeEx)
    383383# define RTAcpiResourceAddExtendedInterrupt             RT_MANGLER(RTAcpiResourceAddExtendedInterrupt)
     384# define RTAcpiResourceAddGpioInt                       RT_MANGLER(RTAcpiResourceAddGpioInt)
    384385# define RTAcpiResourceAddIo                            RT_MANGLER(RTAcpiResourceAddIo)
    385386# define RTAcpiResourceAddIrq                           RT_MANGLER(RTAcpiResourceAddIrq)
     
    428429# define RTAcpiTblLocalOpAppend                         RT_MANGLER(RTAcpiTblLocalOpAppend)
    429430# define RTAcpiTblMethodStart                           RT_MANGLER(RTAcpiTblMethodStart)
     431# define RTAcpiTblMethodStartF                          RT_MANGLER(RTAcpiTblMethodStartF)
     432# define RTAcpiTblMethodStartV                          RT_MANGLER(RTAcpiTblMethodStartV)
    430433# define RTAcpiTblMethodFinalize                        RT_MANGLER(RTAcpiTblMethodFinalize)
    431434# define RTAcpiTblNameAppend                            RT_MANGLER(RTAcpiTblNameAppend)
Note: See TracChangeset for help on using the changeset viewer.

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