VirtualBox

Ignore:
Timestamp:
Oct 27, 2023 1:44:50 PM (13 months ago)
Author:
vboxsync
Message:

Devices/Gpio/DrvGpioButton.cpp: Also release the sleep button after some time, bugref:10538

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Gpio/DrvGpioButton.cpp

    r101618 r101624  
    137137    PDRVGPIOBUTTON pThis = RT_FROM_MEMBER(pInterface, DRVGPIOBUTTON, IEventButtonPort);
    138138
    139     /** @todo Reset to 0. */
    140     return pThis->pGpioPort->pfnGpioLineChange(pThis->pGpioPort, pThis->uSleepButtonGpio, true /*fVal*/);
     139    ASMAtomicOrU32(&pThis->fButtonsPressed, DRV_GPIO_BUTTON_PRESSED_SLEEP);
     140    int rc = pThis->pGpioPort->pfnGpioLineChange(pThis->pGpioPort, pThis->uSleepButtonGpio, true /*fVal*/);
     141    if (RT_SUCCESS(rc))
     142        rc = PDMDrvHlpTimerSetMillies(pThis->pDrvIns, pThis->hTimerDepress, 250);
     143    return rc;
    141144}
    142145
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