📄 power.h
字号:
// Output ExtEscape value:
// 1 = success
// -1 = failure
//
// VGXPMCMD_GET_MONITOR
// ~~~~~~~~~~~~~~~~~~~~
// Descriptiron:
// Reports whether the Power Monitor is currently enabled or disabled.
// See VGXPMCMD_SET_MONITOR above.
//
// Input fields:
// Command = VGXPMCMD_GET_MONITOR;
//
// Output fields:
// bMonitorEnabled = monitor_enabled; // TRUE or FALSE
//
// Output ExtEscape value:
// 1 = success
// -1 = failure
typedef struct _VGXPM_MONITOR_STRUCT
{
VGXPM_COMMANDS Command; // = VGXPMCMD_SET_MONITOR or VGXPMCMD_GET_MONITOR
BOOL bMonitorEnabled;
}
VGXPM_MONITOR_STRUCT, *PVGXPM_MONITOR_STRUCT;
///////////////////////////////////////////////////////////////////////////////
// VGXPMCMD_SET_POWER:
// ~~~~~~~~~~~~~~~~~~~
// Descriptiron:
// Forces the switch of the chip power mode.
//
// Input fields:
// Command = VGXPMCMD_SET_POWER;
// State = required_state; // One of VGX_POWER_STATE.
//
// Output fields:
// N/A.
//
// Output ExtEscape value:
// 1 = success
// -1 = failure
//
// VGXPMCMD_GET_POWER:
// ~~~~~~~~~~~~~~~~~~~
// Descriptiron:
// Reports the current power mode of the chip.
//
// Input fields:
// Command = VGXPMCMD_GET_POWER;
//
// Output fields:
// State = current_power_state; // One of VGX_POWER_STATE.
//
// Output ExtEscape value:
// 1 = success
// -1 = failure
typedef struct _VGXPM_POWER_STRUCT
{
VGXPM_COMMANDS Command; // = VGXPMCMD_SET_POWER or VGXPMCMD_GET_POWER
VGX_POWER_STATE State;
}
VGXPM_POWER_STRUCT, *PVGXPM_POWER_STRUCT;
///////////////////////////////////////////////////////////////////////////////
// VGXPMCMD_SET_IDLE
// ~~~~~~~~~~~~~~~~~
// Descriptiron:
// Sets idle times for Power Monitor:
// dwTicksToMinimal - number of ticks since the last time full power mode or
// reduced power mode have been requested before the
// system will be switched to minimal power mode.
// dwTicksToReduced - number of ticks since the last time full power mode
// has been requested before the system will be switched
// to minimal power mode.
//
// Input fields:
// Command = VGXPMCMD_SET_IDLE;
// dwTicksToReduced = ticks_to_reduced; // Number of ticks to reduced state.
// dwTicksToMinimal = ticks_to_minimal; // Number of ticks to minimal state.
//
// Output fields:
// N/A.
//
// Output ExtEscape value:
// 1 = success
// -1 = failure
//
// VGXPMCMD_GET_IDLE
// ~~~~~~~~~~~~~~~~~
// Descriptiron:
// Returns idle times for Power Monitor. See VGXPMCMD_SET_IDLE above.
//
// Input fields:
// Command = VGXPMCMD_GET_IDLE;
//
// Output fields:
// dwTicksToReduced = ticks_to_reduced; // Number of ticks to reduced state.
// dwTicksToMinimal = ticks_to_minimal; // Number of ticks to minimal state.
//
// Output ExtEscape value:
// 1 = success
// -1 = failure
typedef struct _VGXPM_IDLE_STRUCT
{
VGXPM_COMMANDS Command; // = VGXPMCMD_SET_IDLE or VGXPMCMD_GET_IDLE
DWORD dwTicksToReduced; // Number of ticks to reduced state
DWORD dwTicksToMinimal; // Number of ticks to minimal state
}
VGXPM_IDLE_STRUCT, *PVGXPM_IDLE_STRUCT;
///////////////////////////////////////////////////////////////////////////////
// VGXPMCMD_SET_MODULE_POWER:
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
// Descriptiron:
// Turns the power either on or off for the specified module of the chip.
//
// Input fields:
// Command = VGXPMCMD_SET_MODULE_POWER;
// Module = required_module; // One of VGXPM_MODULES.
// State = required_state; // Either VGXPowerOn or
// // VGXPowerOff.
// Output fields:
// N/A.
//
// Output ExtEscape value:
// 1 = success
// -1 = failure
//
// VGXPMCMD_GET_MODULE_POWER:
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
// Descriptiron:
// Returns the current power state of the specified module.
// The return value can be either VGXPowerOn or VGXPowerOff.
//
// Input fields:
// Command = VGXPMCMD_GET_MODULE_POWER;
// Module = required_module; // One of VGXPM_MODULES.
//
// Output fields:
// State = current_power_state; // Either VGXPowerOn or
// // VGXPowerOff.
//
// Output ExtEscape value:
// 1 = success
// -1 = failure
typedef struct _VGXPM_MODULE_POWER_STRUCT
{
VGXPM_COMMANDS Command; // = VGXPMCMD_SET_MODULE_POWER or VGXPMCMD_GET_MODULE_POWER
VGXPM_MODULES Module;
VGX_POWER_STATE State;
}
VGXPM_MODULE_POWER_STRUCT, *PVGXPM_MODULE_POWER_STRUCT;
///////////////////////////////////////////////////////////////////////////////
// VGXPMCMD_SET_MODULE_MONITOR
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Descriptiron:
// Enables or disables the Module Power Monitor for the specified module
// and hence enables or prevents the posibility of automatical switching
// of the module's power.
//
// Input fields:
// Command = VGXPMCMD_SET_MODULE_MONITOR;
// Module = required_module; // One of VGXPM_MODULES.
// bMonitorEnabled = monitor_enabled; // TRUE or FALSE
//
// Output fields:
// N/A.
//
// Output ExtEscape value:
// 1 = success
// -1 = failure
//
// VGXPMCMD_GET_MODULE_MONITOR
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Descriptiron:
// Reports whether the Module Power Monitor for the specified module is
// currently enabled or disabled. See VGXPMCMD_SET_MODULE_MONITOR above.
//
// Input fields:
// Command = VGXPMCMD_GET_MONITOR;
// Module = required_module; // One of VGXPM_MODULES.
//
// Output fields:
// bMonitorEnabled = monitor_enabled; // TRUE or FALSE
//
// Output ExtEscape value:
// 1 = success
// -1 = failure
typedef struct _VGXPM_MODULE_MONITOR_STRUCT
{
VGXPM_COMMANDS Command; // = VGXPMCMD_SET_MODULE_MONITOR or VGXPMCMD_GET_MODULE_MONITOR
VGXPM_MODULES Module;
BOOL bMonitorEnabled;
}
VGXPM_MODULE_MONITOR_STRUCT, *PVGXPM_MODULE_MONITOR_STRUCT;
///////////////////////////////////////////////////////////////////////////////
// VGXPMCMD_SET_MODULE_IDLE
// ~~~~~~~~~~~~~~~~~~~~~~~~
// Descriptiron:
// Sets the number of ticks for the specified module to be idle before
// the power for the module will be switched off.
//
// Input fields:
// Command = VGXPMCMD_GET_MODULE_POWER;
// Module = required_module; // One of VGXPM_MODULES.
// dwTicksToPowerDown = ticks_to_pdown; // Number of idle ticks
// // before power down
// Output fields:
// N/A.
//
// Output ExtEscape value:
// 1 = success
// -1 = failure
//
// VGXPMCMD_GET_MODULE_IDLE
// ~~~~~~~~~~~~~~~~~~~~~~~~
// Descriptiron:
// Returns the number of ticks for the specified module to be idle before
// the power for the module will be switched off.
// Note that this value does not represent the current actual amount of
// time before the module will be switched off. This value is being
// compared against the difference between the tick count from the last
// activity and the current tick count.
//
// Input structure:
// Command = VGXPMCMD_GET_MODULE_POWER;
// Module = required_module; // One of VGXPM_MODULES.
//
// Output structure:
// dwTicksToPowerDown = ticks_to_pdown; // Number of idle ticks
// // before power down
// Output ExtEscape value:
// 1 = success
// -1 = failure
typedef struct _VGXPM_MODULE_IDLE_STRUCT
{
VGXPM_COMMANDS Command; // = VGXPMCMD_SET_MODULE_IDLE or VGXPMCMD_GET_MODULE_IDLE
VGXPM_MODULES Module;
DWORD dwTicksToPowerDown;
}
VGXPM_MODULE_IDLE_STRUCT, *PVGXPM_MODULE_IDLE_STRUCT;
///////////////////////////////////////////////////////////////////////////////
// VGXPMCMD_SET_CLOCK_ARRAY
// ~~~~~~~~~~~~~~~~~~~~~~~~
// Descriptiron:
// Updates the clock array.
//
// Input structure:
// Command = VGXPMCMD_SET_CLOCK_ARRAY;
// ClockArray = clock_array; // Clock array values
//
// Output structure:
// N/A.
//
// Output ExtEscape value:
// 1 = success
// -1 = failure
//
// VGXPMCMD_GET_CLOCK_ARRAY
// ~~~~~~~~~~~~~~~~~~~~~~~~
// Descriptiron:
// Returns the current clock array values.
//
// Input structure:
// Command = VGXPMCMD_SET_CLOCK_ARRAY;
//
// Output structure:
// The function does not use VGXPM_CLOCK_ARRAY_STRUCT structure to return results,
// instead it returnes only the array
//
// Output ExtEscape value:
// 1 = success
// -1 = failure
typedef struct _VGXPM_CLOCK_ARRAY_STRUCT
{
VGXPM_COMMANDS Command; // = VGXPMCMD_SET_CLOCK_ARRAY or VGXPMCMD_GET_CLOCK_ARRAY
// MODE_CLOCK ClockArray[];
}
VGXPM_CLOCK_ARRAY_STRUCT, *PVGXPM_CLOCK_ARRAY_STRUCT;
///////////////////////////////////////////////////////////////////////////////
// Module power configuration
typedef struct _MODULE_POWER_INFO
{
BOOL bMonitorEnabled;
VGX_POWER_STATE CurrentState;
DWORD dwLastCallTickCount;
DWORD dwTicksToPowerDown;
DWORD dwGateMask;
}
MODULE_POWER_INFO, *PMODULE_POWER_INFO;
#endif // _POWER_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -