mirror of
https://github.com/acpica/acpica/
synced 2025-01-17 23:09:18 +03:00
New "Sleep" command to simulate sleep
date 2004.05.11.22.03.00; author rmoore1; state Exp;
This commit is contained in:
parent
a195a988e8
commit
fdbedec12b
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dbcmds - debug commands and output routines
|
||||
* $Revision: 1.111 $
|
||||
* $Revision: 1.112 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -157,6 +157,37 @@ static ARGUMENT_INFO AcpiDbObjectTypes [] =
|
||||
};
|
||||
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDbSleep (
|
||||
char *ObjectArg)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
UINT8 SleepState;
|
||||
|
||||
|
||||
SleepState = (UINT8) ACPI_STRTOUL (ObjectArg, NULL, 0);
|
||||
|
||||
AcpiOsPrintf ("**** Prepare to sleep ****\n");
|
||||
Status = AcpiEnterSleepStatePrep (SleepState);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
}
|
||||
|
||||
AcpiOsPrintf ("**** Going to sleep ****\n");
|
||||
Status = AcpiEnterSleepState (SleepState);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
}
|
||||
|
||||
AcpiOsPrintf ("**** returning from sleep ****\n");
|
||||
Status = AcpiLeaveSleepState (SleepState);
|
||||
|
||||
return (Status);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDbWalkForReferences
|
||||
|
Loading…
Reference in New Issue
Block a user